77

There are a lot of questions and answers about vim and notepad++ but it's not definitely clear, what is best way to make notepad++ act like a vim (if it is possible at all).

update
It seems than this question needs some additional information of my motivation. I assume myself as a vim beginner. It's quite difficult for me to change my editor at one moment. I think than vim plugin for my current editor can give me easy way to feel more comfort in new environment.

fat
  • 6,435
  • 5
  • 44
  • 70
  • 2
    What do you mean by _act_? Keyboard shortcuts, modal editing, visual appearance, a particular set of features??? And what do you miss in Vim that makes you want to keep Notepad++? – Ingo Karkat Oct 10 '12 at 10:35
  • 1
    I can understand someone is looking for a vim-plugin for IDEs, like eclipse etc. because IDE sometimes brings feature that vi cannot give. But for notepad++... if you love to edit text in vim, why not just simply install/use vim instead of notepad++? – Kent Oct 10 '12 at 10:39
  • have you considered vim for windows? you can get a GUI-based editor with a lot of the vim features built-in. however, i do agree with the accepted answer; you have to use vim to learn it. – Eric S. Jan 09 '13 at 15:58
  • There are still reasons to want this. For example my company policy does not allow me to install new software (i.e. vim), but they do have Notepad++. I am able to get vim bindings for PyCharm with IdeaVim, figured there would be a similar plugin for NP++. – Excel Help Nov 09 '20 at 14:12

4 Answers4

55

You can try ViSimulator for Notepad++, which may meet your requests in somewhat. it is a plug-in for notepad++, which make it possible to edit as vi/vim in notepad++. ViSimulator simulates/emulates most frequently-used vi/vim commands to provide more powerful editing capability for notepad++.

As the description from the site, some commands it supports:

0: move the cursor to colum 1 (hard beg-of-line)
$: move the cursor to end-of-line
^: move the cursor to the first non-blank character (soft beg-of-line)
-: move the cursor to the first non-blank character (soft beg-of-line) of the previous [count] line 
+, <RETURN>: move the cursor the first non-blank character (soft beg-of-line) of the next [count] line
hjkl: move the cursor left, down, up and right [count] colum/line
and more...

ViSimulator can be reached at https://web.archive.org/web/20150515145616/http://www.visimulator.com/download.html. The original page isn't available anymore.

adelarsq
  • 3,718
  • 4
  • 37
  • 47
visimulator
  • 559
  • 4
  • 3
  • 1
    Plugin broke and froze the editor when I tried to use "G" mapping to move to the end of the file. I tried to search for public repo of this plugin and maybe fix the error myself, but didn't manage to find it. You should maybe consider opening the source... or please fix this issue that cropped out. It is the latest version of plugin on this date that has this problem. Thank you! – plesiv Jan 16 '14 at 20:58
  • 3
    Please check to see if you have enabled "Scroll pass EOF" of Notepad++ by some way, such as having installed the plugin "ScrollPastEOF" or others like it. "Scroll pass EOF" may lead to Notepad++ freezing when you scroll pass to the end of a document. to avoid this, you can disable "Clickable link setting" of Notepad++ at "settings... --> Preferences --> Misc". which is a bug from Notepad++ but ViSimulator. If it is not what you met, please let me know, I'd like to check it again. – visimulator Jan 21 '14 at 03:33
  • It seems disabling "Clickable link setting" helped. – plesiv Jan 23 '14 at 08:32
  • is it possible to specify custom commands to visimulator as we can do with vim? For example, I use `ciw` to erase the current word (regardless of current position inside of the word) and go into insert mode. – northben Jul 09 '14 at 03:01
  • @northben : You dont need to make this 'ciw' just use 'bcw', same keystrokes. or better if you just wanna delete the word rather than change it use 'bdw'. – ekerner May 03 '15 at 05:06
40

Most of what makes Vim what it is derives from the fact that it's a modal editor. If there's no way to turn NP++ into a modal editor you won't get far. A quick look at NP++ plugins page shows no Vi[m] plugin so I'd answer "no".

Whatever, the best way to learn Vim is to use it. I'd suggest you keep using NP++ for serious work and force yourself to use Vim for everything else. Once, if ever, you'll be ready, drop NP++ and use Vim full time.

romainl
  • 186,200
  • 21
  • 280
  • 313
  • 11
    I agree to that. I'm renewed to vim (used vi many many years ago), and on the first try now it felt primitive. But after some days with learning vim (much more powerful than good old vi, but vi was good enough), I suddenly understand people that thinks it's **slow** to use the mouse for movements and e.g. copy a word below in the text in a "normal" editor. And if you don't force yourself to use vim, you will never enter vimworld I think. – 244an Feb 05 '13 at 12:09
  • 3
    I think for most people, forcing themselves to use vim for serious work is the way to go -- if you're not forced to climb the learning curve by cutting off alternatives, most people simply won't put up with the frustration of that initial month of vim. – Stabledog Sep 08 '13 at 14:01
  • @Stabledog, you are probably right. My advice was based on my own experience, though. Vim's awesomeness was enough to motivate me. – romainl Sep 08 '13 at 16:25
  • Probably depends on the individual. Part of the problem is that one cannot appreciate vim's awesomeness without first acquiring some skill or understanding with it -- and you can't normally get that without experience. But that experience is so painful that it keeps most people away. Thus the Catch-22: I think most devs make the effort only if they have close working contact with someone who is obviously more productive because of vim... when you watch that caret fly around nipping and tucking with no mouse movement! :) – Stabledog Sep 10 '13 at 13:04
  • 1
    @Stabledog I have to agree with 244an, you should start gradually using Vim or else your work productivity goes to 0 for 1-2 weeks and that can be frustrating / stressful. Use it gradually, and at some point you will be faster with Vim than NP++. – N0thing Jul 15 '14 at 22:32
  • Well I'm happy to support whatever strategy a person finds workable. The only way I can keep my weight in the right range is to completely stop eating calories once a week until the scale says it's ok to continue. That works for me, but I can imagine others preferring to count calories. For vim... nothing worked until I shut off the alternatives, then I learned. And wherever I go, I meet developers who know just enough vim to edit one file at a time, exit back to the command prompt, and load the next file. Some of these guys are pushing 60... – Stabledog Jul 16 '14 at 23:36
  • 5
    You couldnt be more wrong, What makes vi(m) useful is the command functionality. When you know how to use it its the fastest editor in the world by far. Its the command mode which makes vi useful and that is why it has been ported to almost every platform. I dont take developers too seriously if they dont know vi. – ekerner May 03 '15 at 05:03
  • @ekerner, who is "you"? – romainl May 03 '15 at 07:20
  • 1
    You :) sorry for the ambiguity, I refer to "Most of what makes Vim what it is derives from the fact that it's a modal editor". Vim is a little tricky to learn, but once mastered it doubles efficiency. That is what I believe makes it great. I recommend you try it for a month, you wont look back and you too will be looking for vim-ish plugins for all of your editors :) It should also be noted here somewhere that you can get vim for windows. – ekerner May 04 '15 at 13:04
  • @ekerner, FYI I happen to be the #2 answerer of the Vim tag and a rather active member of the Vim community. I don't really need to be convinced of Vim's merits. – romainl May 04 '15 at 14:25
  • @romainl, I appreciate that, but it doesnt make the answer any righter in my opinion. The correct answer to the topic question is by visimulator - currently below for some reason. I of course mean no offense, I just hope the thread doesnt sway people from learning and employing vim functionality wherever available thus increasing their efficiency. – ekerner May 05 '15 at 17:21
  • 1
    You can try also vswin if you write in microsoft visual studio – Lyubomir Velchev Nov 04 '15 at 09:54
  • Notepad++ has a feature that Vim doesn't which is that if you attempt to edit a file that requires administrator privileges, notepad++ will relaunch itself in admin mode (asking the user to confirm and/or authenticate), and you won't lose the changes you made to the file. With VIM, you could make a bunch of changes to a file, try to write, and realize you launched it non-admin mode and now you're hosed. – zumalifeguard Jul 21 '16 at 00:48
  • @zumalifeguard, Vim tells you the file is read-only. You are hosed only if you don't pay attention to what you do. – romainl Jul 21 '16 at 05:41
  • you are right. and that is exactly the reason why vim sucks and notepad++ does not. one address a common use case in windows, the other prefers to spend resources supporting the Amiga – zumalifeguard Jul 21 '16 at 05:55
4

There is ViSimulator plugin for notepad++. And you can install the plugin in the following two ways.

  1. Through Notepad++ plugin manager. Go to Notepad menu Plugins -> Plugin Manager -> Show plugin manager. On the popup dialog, select 'available' tab, and select 'visimulator' in the list of plugins. Then click install button to finish.

  2. Manually install. Download the plugin, as dll file, from ViSimulator download page. Go to Notepad++ installation directory -> plugins folders, and copy and paste the dll file there. Restart Notepad++, you are all set. You will notice there one more menu option, ViSimulator, under the main menu 'Plugins'

Stone
  • 1,119
  • 9
  • 17
1

There is ViSimulator plugin!

 Version 0.3.0.659 ( ANSI / Unicode ) 

ViSimulator

ViSimulator for notepad++ is a plug-in for notepad++, which make it possible to edit as vi/vim in notepad++. ViSimulator simulate/emulate most frequently-used vi/vim commands

to provide more powerful editing capability for notepad++.

simon2013 Sources: from download page

Link: https://web.archive.org/web/20150515145616/http://www.visimulator.com/public/p/visimulator.dll

From NP++ plugins page.

/ is a synonym of standard npp search/replace dialog.
: seems not working.

Sorry, my english is bad.

adelarsq
  • 3,718
  • 4
  • 37
  • 47