Tag Info

New answers tagged

0

I have found autoclose adding a bit of lag, and also interfering with my setup (Ultisnips and Supertab), but I like its approach of emulating Eclipse CDT. I use delimitMate with the following maps to help with the navigation and indentation, trying to get the same results: imap <C-F> <C-G>g " To jump out brackets in same line. ...


1

Yes, you can have that same auto code completion for C++ feature. Both Gedit and Vim have facilities for extension through plug-ins. This allows you to write the completion, so you can have that feature in either of them. You might want to spent some time looking if someone has not already done so.


0

First update your apt database by apt-get update Then search for all the vim packages, since the package name may slightly different for different distros. So better search using very well known names. apt-cache search vim | grep gtk or apt-cache search vim This will list all the packages related to vim and gtk. Pick the right one and then install it ...


0

cp -r [PATH]/badwolf.vim ~/.vim/colors :colorscheme bad[TAB] If you want to use it everytime you open vim add the above command to your .vimrc.


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


3

:set relativenumber has been created to solve that problem.


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 ...


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

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 ...


0

You may be seeing this special behavior documented under :help :bnext: If you are in a help buffer, this takes you to the next help buffer (if there is one). Similarly, if you are in a normal (non-help) buffer, this takes you to the next normal buffer. This is so that if you have invoked help, it doesn't get in the way when you're browsing ...


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


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 ...


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 ...


3

Command line ranges can be use to select a specific line that needs to be edited. Then substitute pattern can be used to perform the edit (append). For example, to append text "hi" at the begining of line 3: vim -c "3 s/^/hi/" -c "wq" file.txt To append text "hi" at the end of line 3: vim -c "3 s/$/hi/" -c "wq" file.txt To find more options and ...


1

I use the c, "change", command quite frequently for this kind of thing, combined with regular search. You can search the file for each line/piece of text you are interested in and then use consecutive n. commands (n for next and then . to repeat the last change.) /^hello - find line beginning with hello; c$goodbye - change line to goodbye; n. - repeat find, ...


1

According to my vim config: tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence (see) So when my config detects that vim is running in tmux (if exists('$TMUX')) it will surround every escape sequence with "\ePtmux;\e" and "\e\\" My escape sequences are xterm specific, but I guess you need to perform a similar ...


1

You're basically asking us to teach you how to program in Perl with this question. There are whole book series dedicated to this topic. (Yes, single books are now too small to contain the whole scope of Perl.) I recommend that you start with the llama book.


1

I'm not sure why this happens but I experience it on vim in xterm with the solarized colour scheme. To fix it, I suspend vim (ctrl-z), reset the terminal (the reset command) and resume vim (fg). So possibly the terminal has entered a weird state not anticipated by vim. This happens more when editing LaTeX than when editing C++ or bash scripts. It seems to ...


1

I thought this is what is documented as Known bugs: Conque only supports the extended ASCII character set for input, not utf-8. - VT100 escape sequence support is not complete. Alt/Meta key support in Vim isn't great in general, and conque is no exception. Pressing Esc+Esc+x or Esc+M-x instead of M-x works in most cases. I haven't used Conque, ...


3

Some basics about search paths When you run a command that does not contain slashes, such as vim, the shell needs to know which file (or shell builtin/function) to execute. It finds this by following the search path, defined in the PATH environment variable. The PATH variable is a list of paths separated by colons, and the shell will look for the command ...


1

This displays all high characters as <xx>: set encoding=latin1 set isprint= set display+=uhex Any single-byte encoding will work, vim uses ASCII for all lower chars and has them hard-coded as printable. Setting isprint to empty will mark everything else as non-printable. Setting uhex will display them as hexadecimal. Here is how the display changes ...



Top 50 recent answers are included