How do I get Vim to recognize ESC key faster?
If you are using tmux, that could be introducing a delay. Put this in your ~/.tmux.conf file: set -s escape-time 0
If you are using tmux, that could be introducing a delay. Put this in your ~/.tmux.conf file: set -s escape-time 0
Absolutely! Go to File -> Settings -> External Tools and add a new one. Program and Working Directory fields should be self-explanatory. The parameter field should be $FilePath$. Click the Insert macro button to see more token values that you could use. You can also bind keyboard shortcuts to the external tools you define. See … Read more
% is the range over which the :s command (short for :substitute) will be run. % itself is short for the range :1,$, which means Line 1 to the last line in the buffer. The Vim help has a couple topics (user manual – :help 10.3, reference manual – :help cmdline-ranges) describing the forms that … Read more
de cuts everything from, and including, the character under the cursor up to, and including, the last character of the world, e is an inclusive motion. dw cuts everything from, and including, the character under the cursor up to, and excluding, the next word, w is an exclusive motion. The answer to your question is … Read more
In command mode (where you are when you hit : in normal mode), you can do ctrl-R /, which will expand to your last search term (other ctrl-R favorites are ” for your yank buffer, or % for the full path of the current window) You actually don’t need to do that though. If you … Read more
Make use of modeline. Put the following line: // vim: set ft=javascript: more info about vim’s modeline.
This behavior is normal. Vim’s default is not to remember which code you had folded vs. unfolded from one session to the next. You can save your current folds; when you finish editing a file, before exiting vim, enter the command :mkview. When you next open the file, if you enter :loadview, it will restore … Read more
From the terminal If you have the mvim script installed (it is in the dmg, just put it somewhere in your PATH), you can just type in a shell: mvim -d file1 file2 You can alias this to mvimdiff if you like. From within macvim In macvim, like in vim , you can also use: … Read more
This works for me: :s/\s\+/ /g
:belowright split will open the new window on the bottom regardless of whether or not you have set splitbelow. Similarly, :aboveleft split will open the new window at the top regardless of the ‘splitbelow’ setting.