Tag Info

Hot answers tagged

3

What you want is to use is the a command instead of the i command to enter insert mode. Or if you want to jump to the end of the line and start insert mode, use A. Note that I will jump to the beginning of the line and enter insert mode.


2

vim uses a runtime script (such as /usr/share/vim/vim73/filetype.vim) which checks the filename, matches it in this case as " Mercurial config (looks like generic config file) au BufNewFile,BufRead *.hgrc,*hgrc setf cfg The script is documented here: Vim documentation: filetype You can customize your environment using similar commands (in ...


2

Ah, yes. I had that same problem. you should add "set t_Co=256 " No set t_Co=16 also, the solarized options are "g:solarized_termcolors= 16 | 256 "g:solarized_termtrans = 0 | 1 "g:solarized_degrade = 0 | 1 "g:solarized_bold = 1 | 0 "g:solarized_underline = 1 | 0 ...


2

:help 'spelllang' tells that the option can contain "A comma separated list of word list names." So, the following should work already: :set spelllang=en_us,de_de


1

You can run this bash command to find any vim related files: sudo find / -name *vim* It will search all directories and return all files that contain vim in the name.


1

The :verbose command can tell you where a number of things within Vim have been set, including options and mappings. Try this: :verbose map _ I should also note that it doesn't make sense to map underscore to the character sequence <- in normal mode. Do you mean it's mapped to <left>, or is it actually an imap?


1

Suppose a particular project root folder is d:\Remote and it's your current working directory. Then (copied & pasted from my command prompt window): d:\Remote>for /F "delims=" %G in ('dir /b /s build.bat') do @echo "%~G" "d:\Remote\bat\test\build.bat" Then you could simply remove @echo... If you are in another working directory: d:\bat>for /F ...


1

Sorry, not enough reputation to comment, but to clarify on the two answers already given: For me, just adding the empty file (as suggested by ak2) fixed the behaviour described by the OP: pressing backspace now removes the character in front of it. But, for me, when at the first position of a line, pressing backspace does not remove the new-line character ...


1

The answers touch on the point that the vim directory containing the vim.exe executable need to be added to the path. But for those needing more explicit directions, follow these procedures. 1. Open Control Panel 2. Go to system 3. Click on Advanced system settings 4. In the Advanced tab, click on Environment Variables 5. Highlight Path in System variables ...


1

So, thanks to Screwtape, I've got an answer for this. Reproduced below: The original xterm mouse protocol only supports up to 223 columns and lines. Later versions of the protocol used UTF-8 encoding, which turned out to be a terrible idea, and more modern terminals support a completely different protocol based on the SGR escape sequence that's much more ...


1

I was able to install vim-airline for gvim on Windows platform. But you should be able to follow the same process for linux based OS as well and install it without any problem. NOTE: This installation procedure is manual. Do the following steps to install vim-airline: Click on download zip (https://github.com/bling/vim-airline) and unzip it. For Windows ...


1

gnu screen does not appear to have a way to turn the feature off (and you would be applying this selectively in any case). The way to fix it would be to modify the shell- and vim-behavior: the bash shell typically does this in the PROMPT_COMMAND special variable. The XTerm Title How-To has general information on that topic. The Set the title of the ...


1

My SpellCheck plugin provides a command that populates Vim's quickfix list with all spelling errors. This is even better than dumping to a file in that you can quickly locate each spelling error. It also sets up mappings in the quickfix list to "remotely" correct / add to spell dict the mistakes.


1

Perhaps you could make that binding work in gvim, but not in vim running in a terminal, because you are unlikely to find a keyboard configuration which sends a different sequence of characters for control/Minus. As a rule, the control modifier affects only a few non-alphabetic characters. Here is a screenshot from vttest, which happens to illustrate the ...


1

The option that controls that is 'scrollopt'. It is set to "ver,jump" by default; you want to add "hor", e.g., :set scrollopt+=hor See :help 'scrollopt'


1

You can explicitly create an additional undo point via <C-G>u in insert mode (:help i_CTRL-G_u). Because that is tedious, I would recommend to build mappings that trigger this. For example, when completing a sentence: inoremap . <C-g>u. Or when inserting a register: inoremap <C-r> <C-g>u<C-r> You can also create one when ...


1

set t_Co=256 enables Vim to use 256 Colors in terminals that support that (I think most of them do). Without that command Vim will only show 8 or 16 different colors. If you load a colorscheme that is 256 colors only (or made for that in mind) it will look off or just not display correctly if t_Co is not set to 256. ...


1

The problem is the TERM=xterm outside tmux. There is no configuration of PuTTY which matches the xterm terminal description, and the mismatch feeds into screen or tmux (take your pick). See for example, in the ncurses FAQ Why not just use TERM set to "xterm"?. The recommendation there is of course to set TERM=putty A quick check using tack shows that ...



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