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.

139 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
99 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
64 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
58 views

In Vim, how to enable Meta in all keybindings?

In case it's relevant, this is on MacOS and iTerm. How do I use key mappings that involve the Meta key, e.g. <M-e>? For example, the auto-pairs plugin has a keybinding that allows you to ...
1
vote
0answers
385 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
116 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
62 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
81 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
63 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
341 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
0answers
108 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
65 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
40 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 ...
1
vote
0answers
293 views

How to close splits automatically when changing file or closing VIM?

I am trying to create my own IDE like setup inside of VIM. This is what I have. I am also using Tmux here if you wonder about the bottom terminal screen. If I change file to another CPP within ...
1
vote
1answer
287 views

How to move to parent directory with LeaderF?

When I'm browsing folders in LeaderF is there a way to move to the parent folder? Background: I'm building a vim (Neovim) profile and looking at file/buffer explorers, and LeaderF seems useful. (I've ...
1
vote
0answers
75 views

Define new text object for snake case

I recently discovered iskeyword as in set iskeyword-=_ so that I can change just part of a snake case word, like changing character_idx to char_idx using ciw. This was working great, except sometimes ...
1
vote
0answers
562 views

NeoVim: colorscheme won't work in init.vim; requires command to be typed

I'm new to NeoVim and just getting started. My init.vim file under NeoVim\share\nvim\runtime\plugin\init.vim successfully sets everything except for the colorscheme and background. As seen in the ...
1
vote
0answers
400 views

Neovim not showing correct background color

I'm running neovim from a uxterm on arch linux with the solarized color scheme. The issue is that on scrolling only the characters which are non-whitespace are displaying the correct background. ...
1
vote
0answers
557 views

CursorLineNR highlight not working

I have a vim configuration file (~/.vimrc) with the following settings: colo delek syntax on highlight clear CursorLine highlight clear CursorLineNR highlight clear LineNR highlight LineNR cterm=...
1
vote
0answers
93 views

Set different values for non-current and current statuslines

When vim is split into different panes horizontally, each pane has its own statusline. It's easy to highlight the statuslines differently based on current and non-current panes. BUT, I cannot figure ...
1
vote
0answers
68 views

How to set up vim tags for JavaScript using vim-easytags

I use YouComplete plugin to do language completion but I can't seem to get tags to work for my own files/functions. I use xolox/vim-misc and xolox/vim-easytags and installed Exhuberant ctags. my ....
1
vote
0answers
181 views

Unable to install vim plugin in raspberry pi

I am trying to install plugin for python in vim,but i am unable to do that. I removed vi tiny from Raspberry pi and installed vi 8.0 I followed instruction from this site https://realpython.com/vim-...
1
vote
0answers
87 views

Strange behaviour when switching buffers in vim (syntax highlighting and keymaps cease to work until .vimrc source)

I have set up the following list of commands to switch buffers: (in a .vim file i source from my .vimrc to keep it organised) ...
1
vote
0answers
56 views

How to auto save on *.coffee files when lose focus (in insert mode) then also back to normal mode

I'd like to lose focus when I'm in insert mode, to trigger auto-save on *.coffee buffers and also I need it to change mode from insert to normal mode to trigger Live compile feature of vim-coffee-...
1
vote
0answers
496 views

How to automate Vim's native auto-completion with a drop-down menu?

I know there is a ton of plugins and topics that discussing about auto-completion things in Vim! I just need the Vim's native auto-completion to be automated! auto-suggestion words, etc from ...
1
vote
0answers
273 views

Running commands when switching to gui mode?

I only recently realized that I have a vimx binary installed that allows me to switch from terminal mode to gui mode with the :gui command. This is nice but it has complicated my configuration ...
1
vote
0answers
57 views

how to set a watch in the vim debugger

I use DBGp Remote Debugger Interface for debuggign in vim. which works excellent, but it's missing some things that I would like to have: a watch variable features (most important) auto complete when ...
1
vote
0answers
44 views

Vim cmdline breaks my view of a file when outputting errors from linters

I really don't know how to explain this, but when I get an error in the cmdline with some linters (Ale and Syntastic for example), it shifts up and basically breaks the view of my code. Vim itself ...
1
vote
0answers
55 views

vim dot command act result not same as full type command with <C-r>"

in vimgolf challenge Words in parens .I use 'cw(ctrl-r")Esc' to format "one", then use 'w.' to format next two words, but the results are three "(one)", I use ':reg' command confirm '"' register ...
1
vote
0answers
164 views

Backticks vs. $() in strings/variable assignment

I'm quite new to Vimscript and editing ~/.vimrc, and was tweaking this file after having installed Pathogen and Syntastic to do live syntax checking for JavaScript. However, in my current set-up, I ...
1
vote
0answers
748 views

vim autoindent not working correctly

This is what I have in my vimrc: if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/...
1
vote
0answers
59 views

Display issue: Vertically center in line when using linespace 20

I have set linespace 20 in my .vimrc and I quite like the clarity it provides. The only issue I see right now is: Notice how the spacing at the top end of the line is more than the bottom end of ...
1
vote
1answer
990 views

Make YouCompleteMe open definition in vertical split even if buffer is not saved

There is something I cannot do with YouCompleteMe that I could do when just using tags to navigate to a definition or declaration. The desired behaviour is (taking into account that , is my leader ...
1
vote
0answers
367 views

Opening recent files issue

TLDR: How can I open a file from the list of recent files without going to the end of the list to get to the prompt for file number? In order to open recent files, I do :bro ol and then when I see ...
1
vote
0answers
220 views

Search not working in function called from autocmd

I am quite new to using vim so please forgive me if this has been asked else where. I have tried Googling but am not really sure what to search for. In my vimrc I have the follwing function that ...
1
vote
0answers
80 views

What are autodoc'd plugins?

Saw this in a .vimrc file: "====[ Ensure autodoc'd plugins are supported ]=========== runtime plugin/_autodoc.vim Any idea on what autodoc'd docs are and how they work?
1
vote
0answers
236 views

How to use neocomplete in ftplugin

I want to use the plugin neocomplete only for a few filetypes. For example for Go programming language. So I have the following entries in my ~/.vimrc/ftplugin/go.vim: ... let g:neocomplete#...
1
vote
0answers
251 views

DelimitMate plugin for vim not working

I am new to vim, so I installed the plugin DelimitMate to my vim. But it is not working in my vim -version 7.4.1689.My plugin manager in pathogen.I searched on everywhere to solve this problem but ...
1
vote
0answers
386 views

vim c++ clang_complete doesn't work for std::cin.get()

I'm using vim to do c++ projects on Mac OS X. To auto complete, I use this plugin: clang_complete For most of cases, such as members of user-defined classes, members of namespaces, it works very ...
1
vote
0answers
1k views

autocmd not being executed when opening file

I've added the following lines to my .vimrc after reading about folding the other day (taken from vim.wikia.com): autocmd Syntax html,python,tex setlocal foldmethod=indent autocmd Syntax html,python,...
1
vote
0answers
421 views

Solarized colorscheme is not displayed correctly (cursorline and relativenumber column)

It worked fine on my home pc, but it messes up colors on my working machine. Here is my .vimrc: set nocompatible filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/...
1
vote
0answers
149 views

Some mappings in my .vim/ftplugin/*.vim change upon entering a window with different filetype, and some don't. What could be the reason for this?

I have special commenting macros for different languages in my ftplugin files, and macros for creating "dividers" (i.e. commented out line of dashes #--------...). I also define a Vimscript filetype ...
1
vote
0answers
113 views

“scroll-smooth” remapping works only in second buffer

I tried to use the "scroll-smooth" tip given in :h tips (see :h scroll-smooth). The idea is to change <C-U> by a series of <C-Y>'s (and the same for <C-D> with <C-E>'s) : map ...
1
vote
1answer
466 views

Mapping doesn't work for tabs

I have several files opened in tabs in Vim. I want to switch between tabs, so I use Ctrl+left to move left (previous) and for next also. But my mapping doesn't work. :map <C-Left> :tabprevious&...
1
vote
0answers
60 views

colored stderr when performing :!make

I was looking for a way to color stderr so when I ran :!make target, I'd see the stderr lines pop up in red so I could more easily see what stopped my build. Inspired by this answer: https://...
1
vote
0answers
300 views

NERDTree file extension highlighting issue: c files not highlighted

function! NERDTreeHighlightFile(extension, fg, bg) exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#' exec 'autocmd filetype nerdtree highlight ' . a:...
1
vote
0answers
76 views

Event SourcePost doesn't exist

While searching for autocommands event I noticed that there are no SourcePost event. This is strange, because nearly all of other event have a Post version of it (e.g. FileAppendPost, BufWritePost, ......
0
votes
0answers
16 views

How to disable super key from opening help.txt?

I would like to disable help.txt from opening when I press the super key, I use window manager and super + h/j/k/l to get around. It's really annoying to have the help open when I'm trying to move ...
0
votes
0answers
30 views

Trouble sourcing YAML syntax highlighting

I'm doing some Ansible work (on RHEL 8), so I want the YAML configs for vim. I have a yaml.vim file containing the syntax/etc, and a ~/.vimrc file: autocmd BufNewFile,BufRead *.yaml,*.yml so ~/.vim/...
0
votes
0answers
25 views

Can't have a proper version of vim with Python

I am on Mint 18.3 Sylvia. I tried to install different versions of vim to have python support, following diverse advices (vim/vim.bacic/vim.gnome/vim.gtk/vim.gtk3/vim compiled from git). I have now ...
0
votes
0answers
31 views

Vim not displaying character values correctly

I opened up vim and noticed that nothing is displaying properly. mI have no idea of the cause as last time I was in vim there was nothing of the sort. I have tried setting the encoding