Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vimrc]

Vim's configuration file.

1
vote
1answer
27 views

How do I use a custom vimrc file?

I have just started using vim and I find a bunch of vimrc files online. How exactly do I tell vim to use this vimrc as the default vimrc. I know I can copy every time but is there a better way to do ...
-1
votes
1answer
41 views

vim error 'E45: 'readonly' option is set' on a file with write permission Debian 9 vim 8.0.707

I wonder why I have the error in title while the edited file have write bit enabled and the good user : # ls -l /etc/hosts -rw-r--r-- 1 root root 693 Nov 15 09:46 /etc/hosts # whoami root Any idea ?...
0
votes
0answers
38 views

How to set scrolling speed of vim like set mouse=a when mouse=v?

I wonder how it's possible to set scrolling speed. As is, when I scroll with my mouse in command or edit mode, it moves only one line at a time. I prefer to move by example 3 line at a time. (speed ...
0
votes
1answer
25 views

Vim: Operator pending mode remaps not working

I'm trying to build a vimscript can be used with the Dvorak Simplified Layout. I.e., given that the keys on the keyboard plugged into the computer are laid out in the Dovark Simplified Layout (and the ...
0
votes
1answer
19 views

Mapping a command not the same as writing command in vim terminal

I'm trying to use a mapping in my vimrc to execute a command. The command works if I directly type it into the vim terminal, but when I use the same command it stops typing it after the first space. ...
0
votes
1answer
35 views

How to enable both this vim feature: mouse cursor move and paste with middle mouse in same time?

I would like to have two features in VIM Mouse Cursor Movement Paste from global clipboard with middle mouse For the first feature I can set mouse=a and the second mouse=r. Separately these ...
1
vote
1answer
15 views

vim is using previous version of vimrc under some circumstances

Funny thing is happening to me on vim: I made some changes to a user's ~/.vimrc in order to customize the status line with a simple function (the changes were made on several saves while I refined the ...
1
vote
0answers
23 views

Vim session with splits with remote ssh files

I use to use vim session to keep my opened files. I do it remotely, ssh remote machine and do things there. Today I tried to open remote files in local Vim, I mean with netrw: :e scp://user@remoteip/...
5
votes
2answers
849 views

How can I Insert the result of a “.w” evaluation at the end of a line in Vim?

I'd like to be able to evaluate a line of Javascript (or other code) in Vim, and have the result appear in a comment at the end of the line. For example, if I have a file like: console.log(4 + 5); ...
0
votes
1answer
760 views

How to use gruvbox airline theme?

I'm trying to use the gruvbox airline theme with my gruvbox color scheme but there doesn't seem to be an official airline theme for gruvbox. https://github.com/vim-airline/vim-airline-themes/tree/...
0
votes
0answers
34 views

how to make vim to have python interactive runtime window

Is it possible to have python live program mode window open in python so we can call program and see the live outcome straightaway instead of jumpout vim to CMD? It is a bit like VisualStudio setup.
1
vote
0answers
69 views

Issue with vim setup python ide

Found ale lint on git about vim but the display after clone from git is still shown as classic instead of the one shown on: The syntax suggestion is not on as well Do I need to run ale toggle to turn ...
1
vote
1answer
75 views

Not able to map any keys between F1 to F5 in gvim

I am not able to map any keys between F1 to F5 in gvim through vimrc. However all the keys after F5 are being properly mapped. Here is my vimrc file content. map <F1> :q!<ESC> map <...
0
votes
0answers
32 views

vimrc script to open a file in new tab which contains the class definition

I am working on system verilog files which contains many class definitions and extending the base classes. I need a .vimrc script which i can use to open a file in new tab that contains the class ...
-1
votes
1answer
192 views

How to hide the status lines of other opened buffers in vim?

The image below illustrates the lines or window titles at the bottom: I wonder how to hide the status lines of other opened buffers in vim?
1
vote
1answer
38 views

How can I change certain keywords in vim to all-caps?

How can I change certain keywords in vim to all-caps? I would like to know as I am programming in Fortran and the required style is to have all the intrinsic functions in caps. For example the keyword ...
0
votes
1answer
109 views

vim multiple specific mappings

What is the best way to specify multiple modes for a map in vim? I know that nmap x y triggers y on receiving x when in normal mode, imap x y triggers y on receiving x when in insert mode, and so on....
0
votes
1answer
37 views

vim remove characters from buffer separations

If you look at the screencasts from vimfiler you can see that there's no characters in the separations, some are just a thin line. Where as mine as the default | pipe character. My question is ...
1
vote
1answer
100 views

Autocmd ignores mapping?

For convenience I mapped "unindenting" to SHIFT+TAB in my .vimrc: nnoremap <S-Tab> << inoremap <S-Tab> <C-D> This works fine if I use it myself while editing, and so I wanted ...
1
vote
1answer
407 views

ability to switch between panes has broken in tmux with vim

Ok, so I run vim inside of tmux and recently (today in fact) I suddenly can't use ctrl+hjkl to switch between panes in tmux and vim, instead it just makes the bell sound and refuses to switch. If I ...
1
vote
1answer
106 views

Vim mapping for .vimrc only

I know about autocmd FileType <TYPE> inoremap <MAPPING> for files like *.html. But i would like to create some keybinds for within my .vimrc like this: autocmd FileType vimrc inoremap ;...
1
vote
0answers
227 views

Vim - Detect Caps Lock Status

My question is simple and straightforward! =D In this thread @OsQu... Vim - Is Capslock on? ... says that you can use the Automation Hotkey Scripting (AHK) below to detect the Caps Lock (on/off) ...
0
votes
1answer
166 views

Vim leader key mapping for multi step copy and paste

When I need to copy and paste large blocks of code from a webpage, I need to do the following one step at a time: :set paste enter Vim insert mode paste clipboard set nopaste enter normal mode I'm ...
0
votes
1answer
99 views

Defining custom command in nvim.init

I am trying to define my custom command in nvim.init (NeoVim) but I've occurred an error. Could be so kind and help me with getting rid of it? Here is a line which I've putted into nvim.init: ...
0
votes
1answer
44 views

Fail to add a new word to the “good” list of vim spell checker

I am using the vim spell checker. When I do "zg" (Add word to "good" list) it apparently works. If I save and quit ( with :wq command) and re-open the document all words get reddish indicating that ...
0
votes
1answer
344 views

How to get vimrc colours to fill the screen?

I have a colour scheme set in vimrc. When I set it and set the term variable to xterm-256color I had the background colour only on the text. I then found the solution to set the term variable to ...
0
votes
2answers
279 views

Plugins configuration file for Vim

I'm quite new to Vim, and, since I'm writing my very own .vimrc file, I was wondering if there is a way to store all the commands relative to a certain plugin configuration in one external file, in ...
0
votes
0answers
382 views

How can i enable mouse support in the command line version of vim?

OS: WINDOWS 7 EDITOR: CDM + VIM Hi i have been building my windows development environment to match my Linux one. I'm currently do SDL2 on windows so i don't want any linux emulation like Cygwin. ...
1
vote
1answer
355 views

vim autocmd not working

Here is my vimrc file: set nocompatible filetype on function Dateinsert() $read !date endfunction :autocmd FileWritePre * :call Dateinsert() I expected to insert ...
3
votes
1answer
133 views

Creating ~/.vimrc disables syntax highlighting

I started using Vim as it was first installed and then decided to change the indentation behavior by adding set tabstop=8 softtabstop=0 expandtab shiftwidth=2 smarttab to ~/.vimrc as suggested by ...
2
votes
2answers
102 views

Vim make a custom macro or command

Although I have been using Vim for quite some time now, I am still a novice when it comes to customizing it. I am not sure if what I have in mind can be done. Here what I would like to do: When ...
1
vote
2answers
121 views

How to disable navigation keys in Vim?

I want to disable the usual keys to navigate on a text editor that is the Up, Down, Left, and Right buttons in Vim text editor. It would enforce the vim-style HJKL keys to be used for the same ...
1
vote
1answer
77 views

How to map commands in Vim?

I am using gVim and there's no vertical split option in it's File menu item. I want to map the default :split and its abbreviation :sp to :vsplit and :vsp respectively, so that it replaces the ...
0
votes
3answers
1k views

Splitting a single file into multiple windows on Vim

Is it possible to open a part of the file as a separate vertical split window in Vim? Say I have a file with hundred lines, and from the fortieth up until and including sixtieth lines I want to be ...
4
votes
1answer
83 views

Source a vimrc from a webpage?

I work with lots of different servers and would like to unify my vimrc across them all. I see that vim has the source command, which I'm assuming works similar to bash. In bash, to source a file from ...
0
votes
1answer
63 views

autocmd behaviour not as expected

I'm trying to set hlsearch on by default when I enter a buffer in vim. Running :set hls manually upon entering a buffer performs the action I expect. However, when I add autocmd BufEnter * set hls to ...
0
votes
1answer
58 views

Vim: Error message on sourcing, but not on start up

I'm pretty new to Vim/gVim and am probably doing something wrong. What I want to do is completely reload my configuration (like a restart), but while gVim is running (keep the current session). Here ...
1
vote
1answer
50 views

Vim: How can I remap a key, but only when I combined it with a number?

I want to center the view after I move up/down multiple lines (e.g. 7j), but not when I only move once (e.g. j but I don't care about 1j). Here's what I have: :noremap j jzz How can I make this work ...
2
votes
1answer
924 views

Vim isn't recognizing my vimrc file

I'm attempting to copy over my local vimrc configuration to a new linux server I've just set up: scp -rp .vim/ nagios:~ scp .vimrc nagios:~ Then, with ls -hoal on the remote machine in my ~ ...
0
votes
1answer
398 views

vim how to unmap [[

The :map [ shows following n [[ *@m':call search('^\s*fu\%[nction]\>', "bW")<CR> n [c <Plug>GitGutterPrevHunk n [ * :w<CR> :unmap [c ...
0
votes
2answers
52 views

Keybinding to make End go one character past the last character on the line

By default the End key takes me to the last character on the line in Vim. However, I have set virtualedit=onemore in my vimrc, and I actually want End to take me one character past the last character. ...
0
votes
0answers
33 views

Vim solarized seems to mixup color

My vim: This is how my looks, look at the change in color from line 38 onwards. Any solution for this?
0
votes
3answers
484 views

How can I remove the dependency of having a `vimfiles` folder in windows?

On linux I can put my colors/syntax/bundle folder right into .vim which doesnt seem to work on windows, it forces me to put them into a subdirectory called vimfiles. Ill try to visualize what I want ...
1
vote
0answers
32 views

vim recent changes breaks vmap?

The same procedure works on my VIM 7.4 patch 1-1572 but not on my VIM 7.4 patch 1-1718, is there anything changed in between that affects this? Procedure: $ vim -u /dev/null some-file Then in vim :...
1
vote
0answers
78 views

Make part of php comment line bold in vim

I've a PHP script, and I would like to know if natively, I can make a part of a comment line BOLD. For example a comment : // it is released when you execute RELEASE_LOCK(), execute a new GET_LOCK()...
0
votes
2answers
524 views

Get rid of vim sidebar and top bar

I just installed Amix' Vimrc and can't figure out how to get rid of the top bar with the file name and the gray bar on the right side of the window any help is much appreciated.
0
votes
1answer
31 views

Multi display: how to restore last gVim display?

I have 2 displays. I start gVim. It window always opens on display 1. I move it to dislpay 2 then close it. After this I start gVim again. It opens on display 1 again but I want it to open on display ...
1
vote
0answers
851 views

How to setup in `~/.vimrc` a mapping for `colorscheme` to toggle `solarized` between `dark` and `light`?

How to setup in ~/.vimrc a mapping for colorscheme to toggle solarized between dark and light? Both background and colorscheme in ~/.vimrc are badly misbehaving! I have setup solarized to work on ...
0
votes
2answers
4k views

Vim error - E138: Can't write viminfo file

I have already checked several similar links but nothing worked. Before i explain the issue, i was earlier getting following message while saving any file: vim e509 Cannot create backup file (add ! ...
0
votes
2answers
839 views

Replace 8 spaces tabs with 4 spaces tabs

I added set tabstop=4 set softtabstop=4 set shiftwidth=4 to my .vimrc file. But tabs in my existing files are still taking 8 spaces. How can I update them?