We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [vimrc]

Vim reads initialization commands from a file called vimrc on startup. This can be used to set settings, define functions, execute autocommands, and more.

130 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
12
votes
0answers
192 views

Using <C-,> causes “<80>ü^D,” to flash in the showcmd area?

I've mapped <C-,> as well as some other special keys (<C-Enter>, <C-S-Space>, ...) in my vimrc like, :set <F13>=^[[44;5u :map <F13> <C-,> :map! <F13> <C-...
7
votes
0answers
367 views

Unable to Enable Vim Conceal

I'm running ArchLinux using the xfce4 terminal with vim-latex. Using this setup, I tried to follow the instructions here to conceal latex commands with unicode. However, after much effort, I still ...
5
votes
0answers
701 views

What is the best practice in vim8 for wrapping with indentation aka breakindent

To have proper paragraph wrapping with indentation in vim (after vim7.4) we could use this: " Wrap the text with identation isntead of the old way set breakindent set showbreak=\ \\_ Since vim8 ...
4
votes
0answers
749 views

Configure custom key mapping for commenting

I am using https://github.com/scrooloose/nerdcommenter/ plugin to comment the code. It's working fine, but I would like to do a modification. Currently these are the default mappings: <leader>...
4
votes
0answers
302 views

Is it possible to get the rule (cinoption) that govern the indentation for a specific line in vim

I have the following code: namespace { template<typename T> struct One // This is the odd line { // impl details } template<typename T> struct Two { // impl details } }...
4
votes
0answers
150 views

Set line breaks, word wraps and word searching for Thai and other non-latin languages

I can set the text width and can manually line break imported paragraphs with the following as an example. set textwidth=72 gqq I can also navigate English text files with the standard 'w' 'b' 'e' '*...
4
votes
0answers
3k views

Using GNU GLOBAL and gtags-cscope in vim

Now I am learning how to use GNU GLOBAL in vim. I have installed gtags.vim. I have gtags the kernel source directory. The .vimrc includes the following lines: set cscopetag set csprg=gtags-cscope ...
3
votes
0answers
49 views

Maps literally read < and > instead of the actual character

Here's the situation: Entire .vimrc: inoremap a <CR> Action: user types ia to enter INSERT mode and type a Expected result: a CARRIAGE RETURN is entered into the document Actual result: the ...
3
votes
0answers
437 views

Can't get autocmd with two events to work

I have the VIM Clang Format Plugin and I would like to format my code every time I save it. This is in my current .vimrc: " map to <Leader>cf in C++ code autocmd FileType c,cpp,objc nnoremap ...
2
votes
1answer
40 views

Syntax highlighting stopped working

I was just started with Vim. While experimenting with basic customization techniques, it began to behave differently. Somehow the default configurations changed to very basic for both GVim and ...
2
votes
0answers
26 views

Issues in changing font size in vim

I using konsole terminal emulator and I am facing some issue with changing the font size in vim. If I add the following snippet into my .vimrc. In the vim application, the font size will snap back to ...
2
votes
0answers
42 views

Is it more efficient to use one function instead of multiple autocommands?

I have a lot of lines with with filetype-specific autocommands defining mappings and abbreviations, which looks like this: augroup vimrc au! ... au FileType blah nnoremap <buffer> aa bb au ...
2
votes
0answers
109 views

How do I setup Mypy with Neomake

I'm trying to use Mypy with Neomake, but without success. I am currently using flake8 with Neomake, and it works seamlessly, e.g.: def foo(bar): return 1 foo(1) > E305 expected 2 blank lines ...
2
votes
0answers
55 views

Unwanted extra indentation of multi-line statements

How can I make continuation lines indent 1 tab instead of align with the some text? With the default cindent options, I get the following: static int A = 0, B = 0, C = 0; But, ...
2
votes
0answers
57 views

Jump to last position when using vim netrw to open a file

I am looking to jump automatically to the last position in any file that I open. I have in my ~/.vimrc file: autocmd BufReadPost * ...
2
votes
0answers
40 views

vi -u doesn't seem to work?

As system administrator I have to work under several user IDs, some of which are shared with others. We all have different tastes in what we like in terms of settings for our vi, so I am looking at ...
2
votes
0answers
60 views

Preventing autocmds from being redundantly repeated

I'm trying to figure out what is the proper way to prevent autocmds from being redundantly repeated. Here are articles which I have already read: Remove augroups around autocmds in .vimrc (related ...
2
votes
0answers
57 views

display list of buffers `ls` without scrolling down

Is there a way to display output at the bottom of the screen like ls does, but without scrolling down to accomodate the output? The Vim Wiki (no https) has the following snippet :nnoremap <A-n>...
2
votes
0answers
40 views

Extending the true line width to enable screen readers to see what blind users cannot

Vim is outstanding. It holds a lot of potential for blind users. I still have one out-of-the-box problem when using vim with screen readers (tested with both NVDA and System Access). But that surely ...
2
votes
0answers
594 views

Why — ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) Pattern not found?

vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38) Included patches: 1-197, 322, 377-378, 550, 703, 706-707 Modified by pkg-vim-maintainers@lists.alioth.debian.org ...
2
votes
0answers
444 views

Syntax highlighting: what is the difference between :syntax match and :match?

Simple question -- what is the difference between the two? When I try, for example, to highlight characters on every line after the 80th with highlight link OverLength Error (OverLength being an ...
2
votes
0answers
244 views

Custom highlights not working in visual splits

I'm a tabs kind of guy, so I highlight leading and trailing white spaces with the following commands in my .vimrc: highlight whiteSpace_trailing ctermbg=red guibg=red highlight whiteSpace_leading ...
2
votes
0answers
832 views

Vim Equivalent of Spyder's Variable Explorer

I am used to coding python in Spyder IDE and wanted to change to vim. I started using vim not long ago, but I miss the variable explorer implemented in Spyder. For those not familiar with Spyder, the ...
2
votes
0answers
271 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 ...
2
votes
0answers
532 views

what is the correct codepage to use with vim airline?

Ok so I have setup my .vimrc as followed but I'm still experiencing a few problems with it: let $VIM=/usr/share/vim/vim74 let $VIMRUNTIME=/usr/share/vim/vim74 execute pathogen#infect() " air-line" ...
2
votes
0answers
225 views

Enhancing Vim gf command for ruby: include module syntax

I am looking for a way to enhance vim gf command class Myclass include Mymodules::HardToFind end I have started with installing tpope/rails-vim: Easy navigation of the Rails directory structure....
2
votes
0answers
705 views

How to set vim theme in Vagrant?

I installed Vagrant within Windows, box is ubuntu server 14.04. My vim script: set t_Co=256 colorscheme solarized " colorscheme molokai But it doesn't works, and I got no solutions with Google. ...
1
vote
2answers
49 views

Is there a way to paste at multiple locations/lines in vim?

I use :copy a fair bit. So like range :12,15 copy 20 will paste a block of text from 12 to 15 lines at 20th line. But when I want to paste a line at multiple places it doesn't work. For example :24 ...
1
vote
0answers
26 views

vim doesn't load syntax for a single file

I was toying around with my .vimrc editing it, and then checking in another file whether my changes worked or not. But now I ended up in a state where opening one file with vim file1.tex (this was ...
1
vote
0answers
33 views

How to make “view” read vimrc?

view is the readonly mode of vim. I would like view to read the exact same .vimrc file for its initialization as vim already does. view does not seem to read ~/.vimrc by default (I checked by adding ...
1
vote
0answers
35 views

How to use actual window size to control vim settings?

Background: neovim with tagbar plugin installed Goal: when starting nvim, if current window size is larger than 100, open tagbar and set auto-open for new buffers. Currently I use the settings below ...
1
vote
0answers
29 views

Vim unknown colored block

My vim on WSL has some unknown colored blocks. The weird thing is it happens randomly and some colored blocks would disappear when I pass them using cursor. The following is my .vimrc settings: ...
1
vote
0answers
31 views

Vim go into insert mode when as a macro starts

When doing <ESC>qq you can record a macro into the q register (still in command mode though). How can I make <ESC>qq go into insert mode right away (without having to type i)? map qq qqi ...
1
vote
0answers
44 views

How to avoid dialog box when using echo in vimrc/gvimrc file?

If there is a echo/echom sentence in the vimrc or gvimrc file, a dialog box is popped out when gvim starts. How to avoid this?
1
vote
0answers
28 views

Remove spacing column begin line

I have an annoying problem that I have no idea how to fix it. Every time I open a specific log file for some weird reason the window starts with 2 spaces column. This happen only with this specific ...
1
vote
0answers
28 views

How to externally trigger [neo]vim to reload an edited file?

I have a file, /tmp/file.txt that is being edited by vim (or neovim), as well as some other external process. I wish the external app to notify vim, in such a way that vim takes that notification to ...
1
vote
1answer
66 views

How to set LaTeX syntax to “ConTeXt” in vimrc

TL;DR: How do I permanently and persistently :set syntax=context for *.tex files? I've been using vim for a LaTeX project, with monokai-tasty as the colour scheme. The default syntax highlighting ...
1
vote
0answers
78 views

Simple .vimrc takes a very long time to save

Saving a file with :w takes several seconds for me, and I can't figure out the culprit. This is my .vimrc " Specify a directory for plugins " - For Neovim: ~/.local/share/nvim/plugged " - Avoid using ...
1
vote
0answers
79 views

Does explicit setting of $MYVIMRC imply its execution as private vimrc?

Vim manual says: "The $MYVIMRC environment variable is set to the file that was first found, unless $MYVIMRC was already set and when using VIMINIT." Does this also mean that setting of $MYVIMRC (e.g. ...
1
vote
0answers
56 views

Syntax highlighting - help me find the bug

I have a bug and I can't figure out the solution. Perhaps you esteemed folk can be of aid. I want to extend a syntax file (julia syntax in polyglot package). I want to include the following patterns ...
1
vote
0answers
242 views

YCM is not working with .ycm_extra_conf nor compile_comands.json on Windows

I have problems using YCM plugged for C-family languages. Here are what I have done: project layout -- build -- src -- source file dir0 -- include main.cpp -- source file dir1 ...
1
vote
0answers
74 views

Pylint symbols and line numbering issue

I have an issue as the image shows where the linting symbols on the left are corrupted. I can't find why this happens. But it appears only in python scripts. I suppose this has something to do with ...
1
vote
1answer
51 views

tabs after pastetoggle instead of spaces

Using following .vimrc " Just to see tab/spaces/endline clearly: set encoding=utf-8 set list set listchars=tab:▸\ ,eol:¬ nnoremap <F5> :set list!<cr> " Tab to spaces settings set tabstop=...
1
vote
0answers
64 views

How do I configure my VI environment on Ubuntu 18.10?

I have a fresh install of Ubuntu 18.10 and VI is exhibiting behavior I am unaccustomed to. For example, when I insert something using "i", 4 spaces are automatically placed in front of what I've ...
1
vote
0answers
51 views

Ignore acronyms as spelling errors in TeX files

My LaTeX files contain lots of acronyms and they are often highlighted as spelling errors. I tried to ignore acronyms by adding syn match AcronymNoSpell '\<\(\u\|\d\)\{3,}s\?\>' contains=@...
1
vote
0answers
264 views

Configure Denite to Open File in New Window

Below is my configuration for denite. When I select a file from the denite buffer, the file is opened in the preview split window rather than a new window. How can I configure denite to open the ...
1
vote
2answers
107 views

Can I define something in .vimrc to speed up pasting of large amounts of data?

Occasionally, I paste large amounts of data into vim, using Ctrl+v in my terminal emulator (in Linux). This takes several seconds before vim is responsive again. I have tried two other methods, which ...
1
vote
0answers
86 views

How to Close Preview When Exiting Denite?

Below is my configuration for denite. When I exit from a denite buffer without selecting a file or buffer via the escape key or ctrl-o q, denite displays the contents of the file or buffer that the ...
1
vote
0answers
41 views

Repeat Emmet commands in vim with dot operator

Is there a way i can repeat an emmet command in vim. Below is the sample text file <h1>Hello World</h1> <h1>Hello World</h1> So i use emmet to wrap the the first line inside ...
1
vote
0answers
37 views

Is it possible to see only defined code except else in vim on linux?

I'm trying to see the verilog and systemverilog programing codes on linux by using VIM. but some codes are defined with so many 'ifdef~'endif syntax. so I'd like to see only the code related with ...