Tag Info

Hot answers tagged

3

:set relativenumber has been created to solve that problem.


3

It depends on which popup menu state you are in (see :help popupmenu-completion). I understand from your question that you're in state 2 (since you've pressed arrow keys to find a completion). However, the default behavior for Enter in state 2 is to insert the completion without newline; what you describe is normally the behavior of state 1 (which is when ...


2

If I understand your question correctly, you can use { and } to go to the start or the end of a paragraph in normal mode. From :help object-motions 5. Text object motions *object-motions* *(* ( [count] sentences backward. |exclusive| motion. ...


1

Copy colors/badwolf.vim to ~/.vim/colors/badwolf.vim; create directories if needed. Alternatively, git clone into ~/.vim/bundles/ and use the Pathogen package manager, or specify the repository with the Vundle package manager, etc. In your ~/.vimrc, put / replace any existing :colorscheme command with: colorscheme badwolf


1

My personal solution to this is to do 5j or 5k commands to move 5 lines up or down. I find that it's faster to do repeated 5j commands, which have become part of my muscle memory, than it is to try to calculate an exact jump. Of course conditions exist when you want an exact jump, but if you're editing text or code, doing a few 5j commands followed by ...


1

What I find useful is instead of moving the cursor around I move the screen: Ctrl-e - Scroll the screen upwards Ctrl-y - Scroll the screen downwards As this scrolls the screen then I can easily read the code rather than paginating and then working out where I was. Then I move the cursor to where I want it on the screen: H move to top of the screen M ...


1

As the external command is executed through the shell, you just have to append a & to launch the process in the background: nnoremap <leader>dc :execute 'silent !drush cc all &' | redraw!


1

In recent Vim 7.4 builds, you can :set wrap breakindent and have the soft-wrapped lines indented (controlled by the 'breakindentopt' option). However, that is a simple, fixed indent; you cannot dynamically influence this (as would be necessary to maintain the syntax). Alternatively, you can reformat (i.e. hard wrapping) with gq, and then :join or :undo ...


1

As an alternative to using your arrow keys, enable your j & k keys to scroll through the autocomplete list. Doing this changes the current line to match the selected word as you scroll. Therefore you do not have to press enter as the cursor is still in insert mode at the end of the substituted word. To enable this add this to your .vimrc (Thanks to ...


1

This will open the specified files and to to the specified line (to wit: line 123) in all specified files: vim -p +'tabdo 123' /path/to/somefile /path/to/some/otherfile



Only top voted, non community-wiki answers of a minimum length are eligible