Hot answers tagged vim
Because visudo is using vi as a default editor.
Efficient answer Press f"d^f"lD to keep the current object in the current line, deleting rest of them. f" - find " d^ - delete from current cursor position to start of line. l - move right D - delete from current cursor till end.(d$) You can create a text object too! :nmap de" f"d^f"lD // de" - delete except double ...
You can. Try this: :command! -nargs=+ Doit :w | :exe "!" . <q-args> . " %" | :e Or if you just want to "hard code" the command: :command! Doit :w | :exe "!something %" | :e Note that user-defined Vim commands must always start with an uppercase letter. For reference: :help :command :help <q-args> :help :execute :help :|
The easiest way I found was to add the file I needed to the system vim file that MacVim created on installation. This file can be found using :scriptnames command. I needed to use pathogen and it was not working placing it in my .vim file in the home directory. I placed the pathogen.vim in the system vim/autoload directory and then pathogen worked without ...
I set the numberwidth to, say, 5 and then set the columns to 85 (80+5) That should be good for files from 0 lines to a million lines. Here is what you may have to put in (default) ~/.vimrc file set numberwidth=5 "Good for files upto a million lines set columns=85 set nu You will see line number are formatted with '%5d' (5 is the numberwidth above) ...
Only top voted, non community-wiki answers of a minimum length are eligible