Questions tagged [vimrc]

.vimrc is the primary configuration file for the VIM text editor

Filter by
Sorted by
Tagged with
0
votes
0answers
31 views

Vim automatically clear the command line

When using vim I like to keep my command line (the line where messages, warnings and errors are printed) empty, so after saving a file I usually issue a <C-l> to redraw the screen and clear it. ...
1
vote
2answers
26 views

Vim is displaying medium dash as �~@~S and long dash as �~@~R

I'm using vim on a shared Bluehost server. When I try to type —, Vim inserts �~@~R. And when I try to type –, Vim inserts �~@~S. The problem is not specific to any particular file. It seems to ...
0
votes
2answers
34 views

Difference beetwen default.vim and /etc/vim/vimrc [closed]

What is the difference between $VIMRUNTIME/default.vim and /etc/vim/vimrc? Why is $VIMRUNTIME/default.vim started first? Shouldn't /etc/vim/vimrc leave first? (Debian 9)
5
votes
1answer
65 views

Make the Shebang of a script different color than comment lines for vim

Currently I have my .vimrc set to produce blue comment lines, I was wondering if it was possible within the vim framework to make the color of line that start with #! a different color than those that ...
0
votes
2answers
37 views

Conflict Ctrl-I with TAB in normal mode

I recently noticed that in normal mode when I type Ctrl-i (command for jumps) it is "confused" for the TAB key. In particular, I have this mapping: nnoremap <Tab> :tabnext<Enter>
0
votes
0answers
36 views

VIM - do not delay mapped keys with common prefix

What I want to do is have two mappings. One mapped to <s-k>, and one mapped to <s-k><s-k>. What happens right now is that if I press <s-k> vim delays for timeoutlenms, and if ...
1
vote
2answers
53 views

Is there a .vimrc setting that will cause vim to open files at the first line?

I'd like vim to automatically open files at line 1 instead of where it left off the last time. I tried putting gg in .vimrc, but that didn't work. There's must be some way to do this.
0
votes
1answer
37 views

Empty string syntax inside vimrc defined via nix home-manager

I want to use home-manager to declare my vim configuration inside a nix-expression with the extraConfig option. I'm trying to run the example .vimrc configuration from coc.nvim and one line reads: ...
1
vote
0answers
16 views

map “j” another character (specifically to a non-latin1, utf-8 character)

I am using a non us keyboard layout. I would like to map "j" to Turkish "ü" character, but also "k" to "j" since it is more convenient and natural for me. (I know this may be bad in the long run etc.,...
1
vote
1answer
449 views

Disabling vim visual mode in /etc/vim/vimrc does not work

I found plenty of questions regarding disabling visual mode in vim but none that tackles my particular problem: I added set mouse-=a to my /etc/vim/vimrc file to disable visual mode for good. Thing ...
0
votes
0answers
32 views

vimrc not getting recognized

I have a vimrc file that does auto indent and ect. but if doesn't seem to be doing what I want it to do. When I do vim ~/.vimrc then it shows that file is empty. But if I go to my etc directory and ...
1
vote
1answer
31 views

Using set paste disables imap jk <Esc>

I use the following line in ~/.vimrc to allow me to press jk instead of Esc. :imap jk <Esc> It works fine until I add a :set paste: " Pressing jk is same as pressing Esc :imap jk <Esc> ...
1
vote
1answer
48 views

vim: command map to two commands gives E488

I'd like a Build command that starts a build independent of what build system is used. command! -nargs=* Build :Makeshift<Bar>MakeshiftBuild <args> gives me E488: Trailing characters ...
1
vote
1answer
127 views

expand tab is not working on vim

I set the expandtab option to on, but still I don't get spaces when I click tab, but I get actual tab. This is how I set it: set expandtab set shiftwidth=4 set softtabstop=4 First I thought as ...
1
vote
1answer
44 views

vim find claims to have many files but it is not

If I type ls in my directory, I get: README.md lib sdf.t t.t t1.t t2.t tt.t I am in vim, and if i type: :find *.t, I get:too many file names What is that happening? If I ...
0
votes
0answers
42 views

ctrl+h,j,k,l not working when ssh to linux cluster

My local workflow is to use CTRL + H to move to the left vim pane, and the other usual directions CTRL + J, CTRL + K, and CTRL + L to move to other vim panes. My setup works great on my local machine....
0
votes
0answers
91 views

Vim statusline shows ^[[2;2R^[[>41;330;0c^[]10;rgb:e5e5/e5e5/e5e5^G^[]11;rgb:0000/0000/0000^G after mapping Capslock to Esc

I added au VimEnter * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape' au VimLeave * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock' to my .vimrc to map Capslock to Escape. ...
1
vote
4answers
89 views

prevent vim from replacing % with file name

I am messing around with .vimrc and I had this idea to have function like follow: function Fill_line () execute "! printf '=%.0s' {1..10}" endfunction my output is: Hello =test.cpp.0s I ...
3
votes
1answer
147 views

Validate `~/.vimrc`

I want to validate that my ~/.vimrc file is correct, basically just by launching vim and immediately running quit. I can almost do this with vim -c quit, except that I have to press the enter key. For ...
1
vote
1answer
476 views

Change vim cursor in Terminator

I am using Terminator in Ubuntu as well as vim. My question is whether there is a possibility to use an underscore cursor in insert mode and a block cursor in normal mode. I read on http://vim....
1
vote
1answer
1k views

Neovim colour scheme in Urxvt not rendering correctly

I'm trying to use a 256 color theme in Neovim (this one: https://github.com/ayu-theme/ayu-vim), but can't get it to render correctly on Urxvt, even though it seems to support 256 colors: Here is the ...
0
votes
1answer
413 views

Colors in Terminal and VIM with Windows Subsystem

I'm running Debian GNU/Linux through the Windows Subsystem, and I thought it was pretty cool. However, I'm having issues setting up colors in my terminal and VIM. I used to use Ubuntu as a thing to ...
0
votes
1answer
117 views

vim: how can i make a mapping from a autocmd

in my .vimrc i have an autocmd which cleans up my files, but how can i make a mapping out of the command? autocmd BufWritePre *.test1 silent! :%s/\s\+$//e | silent! :%s/\(\n\n\)\n\+/\1/ | silent! :%s#...
0
votes
1answer
169 views

RedHat global vimrc does not work

I wanted to setup global vimrc. But it does not work. I have it setted up in /usr/share/vim/vimrc where I have this config. colo torte syntax on what I am doing wrong if the color scheme is not ...
0
votes
0answers
44 views

Vim pasting causes copy into clipboard? [duplicate]

So this is strange. If I have the following: function noTypo(){return;} fucntion doSomething(){return;} fucntion doSomethingElse(){return;} And I highlight and yank function in function noTypo(), ...
27
votes
3answers
12k views

Opening a vertical terminal in Vim 8.1

Vim 8.1 added the :terminal command, which opens up a new bash terminal as a split. However, it always seems to be a horizontal split, and I prefer vertical splits. Is there a way to open a terminal ...
0
votes
1answer
319 views

How to make vim interpret escaped characters as colors

I'm using zap logging for an application and I've noticed that when I open the log using tail the colors resolve as expected but when using vim I get a bunch of entries that look like the following: ...
3
votes
1answer
691 views

Using local system's .bash_profile and .vimrc on remote systems

Risking asking a possibly duplicate here but could not get any relevant answers. I wish to use my local system's .bash_profile and .vimrc on all the remote hosts I log in to. Is there an easy way to ...
2
votes
2answers
499 views

How to customize vim windows for python development?

I am new to vim and I want to use vim as an IDE. I have installed python-mode for making it into a python IDE. I want to split vim windows into three screens with their own functions. Top left side ...
0
votes
1answer
678 views

What causes this E474: Invalid argument error from my .vimrc?

I copied my .vimrc from my Mac to my ~/.vimrc on a CentOS host - it contains the following: 1 set number¬ 2 set listchars=eol:¬¬ 3 set listchars+=tab:>·¬ 4 set listchars+=trail:~¬ 5 set ...
1
vote
1answer
1k views

What to do with corrupted vim display?

What is the best way to deal with remnant text in vim editor? I'm ssh to a remote terminal using Xquartz, and edit my code using vim. When I hit return, there remains text displayed in the current ...
0
votes
1answer
168 views

:set nohlsearch doesn't work

When I open an existing session with VIM the setting set nohlsearch at the very end of ~/.vimrc has no effect. It has effect only when I run it manually. I also noticed that if I open a file that isn'...
0
votes
1answer
118 views

A smatrer way to un-comments in Vim

I think a nice way to do the comments is key mapping. I need to comment/un-comment c style code, here is my mapping nnoremap <leader>c 0<insert>//<Esc> ...
2
votes
2answers
724 views

Delete to end of command line in Vim

I like to use shell style shortcuts in insert and command-line mode, such as CTRL-K to delete to end of line. This mapping works in insert mode: inoremap <C-K> <C-O>D But I can't figure ...
-1
votes
1answer
392 views

Turning on colours in vim is not working for some files

My .vimrc file is as follows: filetype plugin indent on syntax on " enables syntax, e.g. text colour set number " show line numbers The command I use to open files is vim ...
1
vote
3answers
1k views

Creating a .vim directory

I just installed Vim again and noticed there is no .vim directory in my /home directory. I have read that if I create .vim myself then this will override the values in /etc/vim. My questions: Should ...
0
votes
0answers
390 views

Vim is showing a different color when setting it up in .vimrc file than when selected it manually when Vim is running

I am experimenting color schemes for vim, and it isn't the first time the same scheme of colors shows differently when I set it manually by typing color [file name].vim and setting it up in my .vimrc. ...
0
votes
1answer
502 views

Changing the default fallback substitution fonts in Linux ubuntu cyrillic

In VIM need correct view cyrillic font. But NERD fonts, not support cyrillic. How to set default cyrillic font in system? P.S: ubuntu 17.04, 16.04
0
votes
0answers
274 views

Sharing zsh and vim configuration with root user

I have modified my .zshrc and .vimrc to my likings. Both files source other files containing more configuration and plugins (vundle, antibody). Now I would like to use these configurations when I ...
1
vote
1answer
286 views

How can I see/change what makes vim beep?

Vim beeps. A lot. For instance, whenever I type a '>' in insert mode (can't even guess why it dislikes that specific character), or execute a macro, or tab-complete a file path. This is really ...
0
votes
0answers
40 views

Vim won't use default colorscheme

I was using the default vim colorscheme, and one day when I turned on my computer, suddenly everything was a really weird theme with a red background and yellow/white text (I'm not even sure if this ...
0
votes
1answer
338 views

How to substitute words in git rebase file

I'm trying to set up visual mode mappings for quickly editing git's generated rebase list from when doing interactive rebase (e.g. git rebase --interactive upstream/master). In such you're presented ...
10
votes
1answer
2k views

Stop vim pasting selections as text!

I have been using VI and VIM for years (30 or more) (in xterms, not its own window, gvim) and I have a huge library of vim commands that I give vim using the mouse middle button as a selection. For ...
1
vote
1answer
189 views

Cannot get YouCompleteMe to function

I am trying to setup YouCompleteMe (YCM) with vim for my Linux Mint 18.1 KDE machine. I followed the steps on the git page for Ubuntu however cannot get it to work. Is it an issue with Linux Mint or ...
0
votes
0answers
486 views

Installed a VIM plugin but ran into an error: E117: Unkown function

I install google/vim-codefmt plugin and then install clang-format and restart VIM, then I run :FormatCode, but I'm getting the following error: Error formatting file: VIM(let):E117: Unkown function:...
0
votes
4answers
700 views

vimdiff - Weird Issue comparing 2 files

When I compare the below 2 files its comparing it wrongly. How to compare? All the rows are available in the file2 but its not working. When I do a "vim -d a b" its showing like the values are missing ...
0
votes
2answers
189 views

Is there a fuzzy finder option for vi?

I'm a convert to and now big fan of vim However there's still one thing that I'm envious of in other editors: Fuzzy finder matching Is there an option or plugin for those to work the way I see it ...
8
votes
2answers
1k views

Configure shortcut on Vim to save file

I was wondering is it possible to create a custom shortcut in vim or vi to save open file? For example, CtrlS instead of typing each time :w? Thanks!
2
votes
1answer
399 views

Is there a way to make vim automatically add a space at the beginning of a comment?

I'm setting up my .vimrc for learning Python. So far I have: " configure expansion of tabs for .py files au BufRead,BufNewFile *.py set expandtab set expandtab " Use spaces instead of TAB set ...
1
vote
1answer
328 views

modes not showing in status bar of vim

I installed vim version 7.4.1689 in my linux mint 18. I opened any file with vim but after switching between modes on the status bar it is not showing anything like which mode I am currently in. I ...