# All Questions

9,496 questions
Filter by
Sorted by
Tagged with
23 views

### Remap last autocompletion word [duplicate]

I want to map Ctrl-M to go to the last autocompletion word. Currently, Ctrl-P does this. In my .vimrc: inoremap <c-m> <c-p> And this adds the functionality I want. However, if I'm in ...
906 views

### Switching .c/.h buffers

I normally work with 2 windows, vertically split. The problem I would like to solve, is: easily jumping back and forth from header <-> implementation file I'm investigating, without luck, 2 ways ...
53 views

### Can I set German spell checking to ignore the case of nouns?

German nouns are normally spelt w/ a capital first letter, but can I make the spell checker stop caring about that?
2k views

### Project Wide replace using Ag

Referencing Post: https://stackoverflow.com/questions/22206332/vim-ag-search-and-replace-globally-and-within-a-directory Specifically: :Ag foo :Qfdo s/foo/bar/c I type Ag miwt-os, I get this: ...
156 views

### Formatting with par, better padding

I've started using set formatprg=par\ 66q\ g1\ j " keep double spaces, justify which makes beautifully justified paragraphs. But it would be better if the algorithm preferred to pad after .:;, in ...
336 views

### Can I add a custom paragraph delimiter?

Paragraphs are delimited by empty lines, both in vim and tex, but sometimes I wish vim to treat an entity as a paragraph and not tex. Can I, e.g., make vim treat lines containing only a "%" as a ...
853 views

### Avoid extra spaces while pasting block with different line lengths

I have the text var1=a var2=aaa var3=aaaaaa some text... "" ... some text... "" ... some text... "" ... I want to paste the a-part of the top 3 lines into the quotes in the last 3 line. The result ...
191 views

### The first and last 5 lines of a file? Use for file specific spell ignore list?

Rumor has reached me that it is possible to place vim commands in the first five, or in the last five lines of a a file. But, I could not find this in Google. Any leads would be appreciated. I ...
900 views

### How do I create buttons on the toolbar to increase and decrease font size?

Many systems offer + and - zoom buttons. Can someone please demonstrate how such two buttons can be emulated with gvim? This means that clicking the + button would increase the font size by one step....
89 views

### Conflict: concealment and paragraph formatting

When formatting paragraphs with concealed elements, the formatting program does not take into account that some characters are invisible, and renders some lines shorter than the rest, when using the ...
75 views

### How do I hide a TeX macro and highlight the arguments?

I have to put a macro in front of Greek text to get correct hyphenation, such that I have, e.g.: possibly \textgreek{κινούμενον} and possibly not. Could I use conceal to conceal the macro and show ...
340 views

### Formatting with par and justified option

I just learnt from a vimcast (#18) that one can format paragraphs justified. This seemed very attractive to me, but I had one problem with it: I use double spaces after the end of sentences to ...
1k views

### Can't Move to End of Line With Vim on Cygwin

I'm using Vim on Cygwin. Basically, Vim won't allow me to move past the last character on a line when I'm in normal/command mode. It will let me move right before the last character but not after it. ...
826 views

### Color scheme won't fully source from .vimrc

I just added a few things to my colorscheme.vim which is sourced from my .vimrc. In fact, it is the last line in the .vimrc.1 source ~/.vim/colorscheme.vim Oddly, now most of it doesn't apply, yet ...
348 views

### Conceal not working with tex files and vim-plug

Normally, :syn match Entity "e" conceal and :set conceallevel=3 results in all es being concealed. But, if I use vim-plug, this does not work in a tex-file …
133 views

### Have different tabs/windows remembering their mode

I have done a bit of research about this but found only very old answers, like this one, and all on the negative side. My problem is the following --- suppose you are working on a document/program, ...
157 views

### Make sense of “[[”, “]]”, “[]”, “][”

I found it hard to understand these text object motions: *]]* ]] [count] sections forward or to the next '{' in the first column. When used after an ...
997 views

### Can Vim write incremental lines? i.e. on each line A becomes B, and 1 becomes 2

I wanted to write this: A = mapping[0] B = mapping[1] C = mapping[2] D = mapping[3] E = mapping[4] F = mapping[5] G = mapping[6] H = mapping[7] I = mapping[8] J = mapping[9] K = mapping[10] L = ...
111 views

### changenr() + undo does not work as expected

Minimal (not-)working example: fun! Test() let save=changenr() call append(0, "THIS MUST BE UNDONE") exe "undo ".save endfun command! -nargs=0 T :call Test() Now open a file, insert some ...
341 views

### Make vim version 7 edit xml files

I'm using old Debian linux an vim version 7.1.314. I would like to edit eclipse .cproject file that build using XML syntax. Currently vim shows not colored information. I found vim plugin that I hope ...
559 views

### How do I run Cakephp's tests (PHPUnit) and output it to QuickRun or other window?

Is there a way to run tests of the current opened file and get output in other window like vim-QuickRun does? Right now I'm running tests by the command in command line: /vagrant/my_project/app/...
498 views

### neovim: autocompletion on user defined command plugin

I am write a plugin for neovim in python using this client and I looking for a way to offer completion when executing a command. I have look at the following example to structure my plugin. As an ...
3k views

### Installation of YouCompleteMe

I have been trying to install YouCompleteMe for a long time. At first, I failed because I need to build Vim having python support. Now I have it solved, but I always fail at building YouCompleteMe ...
1k views

### How do I align C++ comments to be compliant with Google styling?

Any way to get Vim to format my comments to comply with Google cpplint? Top section is not compliant, to comply 5 changes are required. keep this comment at the same level Add a space after // add ...
991 views

### How to show non-printable characters for all buffers, windows & tabs

Is there any way to show non-printable characters by default, for all windows, buffers, tabs, opened inside Vim (including man pages, netrw buffers, etc.)? Additionally I also like to see the non-...
299 views

### How do I spellcheck TeX files using vim-lexical, skipping some command arguments but not others?

I use the vimtex plugin for TeX editing and vim-lexical for spell-checking. This works generally fine, but there are several commands vim-lexical tries to spellcheck. For example, in \includepdf{...
1k views

### How to show line numbers for all buffers, windows & tabs

Is there any way to show line numbers by default, for all windows, buffers, and tabs opened inside Vim (including man pages, netrw buffers, etc.)? What I have already tried to edit _vimrc by putting ...
115 views

### Format options setting collapses lines

I set up this nifty custom function to help me use Vim for word processing: func! WordProcessorMode() setlocal formatoptions=ant setlocal textwidth=60 setlocal wrapmargin=0 endfu com! WP ...
254 views

### Delay after selecting item from completion list

I am using terminal vim 7.4 and standard completion, i.e. <C-x>,<C-p> for word completion <C-x><C-o> omnicompletion <C-x>,<C-f> for file completion etc, ~/....
5k views

### Vim filename/path completion

I know I can complete filenames/paths from the current directory using ctrl+x, ctrl+f (compl-filename). That works great in combination with set autochdir, which changes updates the current directory ...
84 views

### Keeping lines identical

I realize that this is probably too much to ask, but: sometimes one wants certain lines in a document to remain identical; might there be a way to link two lines such that changes to one are ...
2k views

### How do I stop a recursive macro at the end of the line?

How can I create a recursive macro so that it only runs until the end of the line? Or how to run a recursive macro until the end of the line only?
253 views

### Vundle won't install plugins due to an error about AppData/Local/Temp

I am on Windows 10. I just installed Vundle and now I am trying to run the PluginInstall command. However, I am getting errors saying it can't open a file in AppData/Local/Temp. This does occur on all ...
84 views

### Am I missing something using vim-LaTeX? [closed]

I am an average user of vim and LaTeX. I hate using anything but the keyboard while working on the computer. Following popular recommendations I have been using vim-LaTeX for few years now and have ...
46 views

### Private spellings, adding and marking standard as bad in one operation

I enjoy spelling Latin and Greek loan words according to their original spelling, e.g. præcise and œconomy. Might there be a convenient way to add these to the spellfile (manually) and at the same ...
1k views

### Folding slow with vimtex

Automatic folding with the vimtex plugin is unbearably slow. Is there anything I can do to speed this up? I tried installing the fastfold plugin but that did nothing I could notice.
393 views

### How do I allow sentences to begin with lowercase letters?

My spellchecker wants me to begin every sentence with a capital letter, i.e., it underlines lowercase characters after full stop. Can I make it stop?
338 views

### Vimfiler (a plugin): how to open .doc file using MS Word

I have a question regarding a plugin called Vimfiler. What I want is to open a .doc/.docx file using MS Word from Vimfiler. For this, I added the following call vimfiler#set_execute_file('doc,docx', '...
30 views

### Folding from occurrence to next; two or more comments

I wanted to fold my LaTeX document and found this: https://tex.stackexchange.com/questions/130586/vim-nice-folding-function (Which seems to indicate that folding has been removed from Latex-Box?) ...
206 views

### BufWritePost not working after navigating using netrw

I'm trying to deploy some static content upon writeing a buffer with an autocmd: augroup dep autocmd! autocmd BufWritePost myProject/frontEnd/** :call s:deploy() augroup END The s:deploy ...
1k views

### Map single key to compile and open LaTeX PDF [duplicate]

I use VIM for writing in LaTeX and I would like to have a single key to compile the text and open a PDF of it. I have the line map <F10> :!pdflatex % && start %.pdf in my vimrc. It ...
137 views

### How to wrap plain text honoring existing text indent?

With at least these settings: expandtab textwidth=79 sw=4 ts=4 fo=tcq If I have a long line of text that starts with a * (like a C/javadoc comment) it will honor the current indent level when I gqq, ...
208 views

### Adding words to one of many spellfiles

Say I am mixing English and German in my documents and have my spelllang variable set accordingly. How do I indicate, when I want to mark a word as good, to which spellfile it is to be added?
286 views

### How to map Alt-PageUp in Vim?

I know about this thread. Using sed -n l, I get the following output for pageUp : ^[[5~ for alt+pageUp : ^[[5;3~ The alt+pageUp seems to be sending new char altogether and not combination of Pageup ...
212 views

### Remap of C-R registers and “\xx” syntax

I tried following this tip from vim wikia: :inoremap \fn <C-R>=expand("%:t:r")<CR> For me this doesn't make any difference to the functionality of Ctrlr% in insert mode (it still just ...
2k views

### Neovim python3 support not working

I have problems getting python3 support working in neovim. I have followed the instructions in :help nvim-python, but :echo has('python3') returns 0. I have tried installing the neovim python ...
146 views

### substitute 'which apt' to \$(which apt)

i want to substitute the text 'which apt' to \$(which apt). :s/'\&.*'/\$(\0) does substitute to \$('which apt'). How can i leave those single quotes out on the substitution, so that just \$(..) ...
702 views

### Backspace in insert abbreviation

To work, abbreviations need to be separated by whitespace. E.g., if I have an iab fo FOOBAR then typing whatfo will not trigger the abbreviation. There are some obvious sensible reasons for this. ...