Questions tagged [vimrc]

Vim's configuration file.

Filter by
Sorted by
Tagged with
0 votes
1 answer
58 views

Can't convert vim macro text to normal characters

I'm trying to save a vim macro that I wrote into my .vimrc file. I successfully recorded the macro into register s, the contents of which display as: .,.s/S:/\&AHOMW€kbW€kbE/:.,.s/\\/\//g'€kb0 I ...
user avatar
  • 315
0 votes
1 answer
129 views

Mapping redo in insert mode VIM

How to remap a redo shortcut (Ctrl-R in normal) to Ctrl-Shift-Z in insert mode? It would be helpful since I mapped undo to Ctrl-Z like this: nnoremap <c-z> :u<CR> vnoremap <c-z> :u&...
user avatar
  • 121
0 votes
1 answer
101 views

How to start Vim with a clean jumplist

I want Vim to start up with a clean jumplist. I don't want to go back to old files i edited in another session when I press CTRL-O. The jumplist is stored in .viminfo and I can't get it to disappear ...
user avatar
0 votes
1 answer
85 views

How do I change Vim splitting key-mapping?

I have recently started learning Vim, and I don't like the default key-mapping of splitting windows in Vim. That is, I don't like to enter C-w and then S for horizontal and v for vertical, and moving ...
user avatar
0 votes
1 answer
22 views

Remapping default bindings vim

When I press ctrl+h in insert mode vim cuts character to the left. I have tried: noremap h <NOP> inoremap h <NOP> noremap <C-h> <NOP> inoremap <C-h> <NOP> to ...
user avatar
1 vote
2 answers
331 views

How do I move all of my dotfiles to a custom directory?

I'm a Mac user and I was wondering if there was a way to put all of my dotfiles to a .config folder to store all of them (something analogue to XDG Directories on Linux). I was trying to set up a ....
user avatar
1 vote
2 answers
651 views

How do I resolve a keybinding conflict with coc for vim?

Just as a preface, I'm not a programmer, but I've written a bit of shell to automate things. This is on MacOS Mojave, but it shouldn't make too big of a difference since neovim's configs should carry ...
user avatar
2 votes
1 answer
364 views

Solarized leaving red highlighting at the end of lines in vim

I'm using vim with the solarized dark color scheme within the Windows Subsystem for Linux. Solarized looks great except for one strange feature. When I scroll down in a vim file and then scroll back ...
user avatar
3 votes
1 answer
133 views

My VIM basic imap mappings have no effect

Good afternoon, I am struggling with Vim mappings. I would like to practice over very basic ones such as "replace a-s with b-s", or "replace ù with /", but I do not succeed. Here are my trials: :...
user avatar
  • 33
1 vote
0 answers
160 views

Why Won't Deleting vimrc Reset Vim Settings? (Mac)

I reinstalled Macvim using Homebrew, deleted and reinstalled both the vim folder at /usr/shared/vim and vimrc. When I open text files with vim the settings are the same and any changes I make to the ...
user avatar
0 votes
1 answer
39 views

My Esc+<left arrow> deletes 3 lines in vim

I am somewhat confused as what can be the cause of it. I disabled everythin in vim (replaced .vimrc with a blank file) and still, when I press Esc+left, I delete the 3 lines above my cursor, and with ...
user avatar
  • 101
1 vote
1 answer
593 views

my WSL ubuntu vi editor screen is broken when I scroll down

When I scroll down at my vim editor, all of my codes is wrapped with strange boxes. Can I fix it? My .vimrc file: Problem Image:
user avatar
1 vote
0 answers
438 views

Vim - E490: No fold found

I'm having problems folding some lines in a LaTeX. I use the set foldmarker=/*,*/ option in my .vimrc, and is working fine in the main file, but when I change the buffer, in the other file, I can't ...
user avatar
  • 11
0 votes
0 answers
243 views

Unable to include plugins using vimrc . Error for each line of my vimrc

I have installed gVim and trying to have customizations, i.e, including plugins. https://raw.githubusercontent.com/kinbiko/dotfiles/master/vimrc Used multiple plugin managers, but in vain. Error ...
user avatar
2 votes
1 answer
85 views

How to make Vim "repeat search" direction absolute instead of relative?

I am looking for a way to make Vim always go backwards whether I press repeat last , or N and forward when using their pairs ; or n. Currently Vim is using a relative direction which depends on the ...
user avatar
2 votes
1 answer
835 views

How to move from insert to replace/overtype mode in vim

How can you switch from insert mode to replace/overtype mode in vim? In windows/*nix I just hit the insert key twice (command->insert->replace), but unfortunately i'm stuck on a mac now which doesn't ...
user avatar
1 vote
1 answer
153 views

Extending highlight on line number to ALE gutter as well

I have set cursorline enabled, and it works. I'm also using ALE to lint my code, and I have the sign gutter set to show always (g:ale_sign_column_always). However, in filetypes that ALE knows how to ...
user avatar
  • 13
1 vote
1 answer
90 views

Move cursor by line number when moving through multiple lines (e.g. `5j`), move by display line when moving through a single line (e.g. `j`)

In Vim, I have the following set in order to have ragged right soft-wrapping of lines: set linebreak set wrap When traversing multiple lines at once, an annoying side effect is that 5j will not move ...
user avatar
0 votes
1 answer
162 views

Why remapping <End> key to <S-A> causes Vim to behave weird?

nnoremap <End> <S-A> " line comment Pressing End key then produces the desired effect but vim also appends " line comment to the end of the line! Is there any way to kinda let vim ...
user avatar
0 votes
1 answer
5k views

How do I set the font in command line vim (vim for windows)?

everything I see says I should use guifont but if I open a console and try to tab complete set gui--- I only see set guicursor Im using command line vim not gui vim. What do I put in vimrc to set ...
user avatar
1 vote
1 answer
212 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 ...
user avatar
-1 votes
1 answer
1k 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 ?...
user avatar
3 votes
0 answers
1k 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 ...
user avatar
0 votes
1 answer
64 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 ...
user avatar
0 votes
1 answer
29 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. ...
user avatar
0 votes
1 answer
589 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 ...
user avatar
1 vote
1 answer
173 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 ...
user avatar
  • 45
1 vote
0 answers
147 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/...
user avatar
  • 514
5 votes
2 answers
994 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); ...
user avatar
  • 173
2 votes
2 answers
14k 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/...
user avatar
  • 1,783
1 vote
1 answer
1k 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.
user avatar
  • 143
1 vote
0 answers
258 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 ...
user avatar
  • 11
2 votes
1 answer
666 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 <...
user avatar
-1 votes
1 answer
642 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?
user avatar
1 vote
1 answer
146 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 ...
user avatar
0 votes
1 answer
448 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....
user avatar
  • 137
0 votes
1 answer
309 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 ...
user avatar
  • 253
1 vote
1 answer
248 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 ...
user avatar
  • 137
1 vote
1 answer
961 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 ...
user avatar
  • 253
2 votes
1 answer
249 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 ;...
user avatar
  • 137
2 votes
0 answers
446 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) ...
user avatar
0 votes
1 answer
477 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 ...
user avatar
  • 732
0 votes
1 answer
1k 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: ...
user avatar
  • 101
1 vote
1 answer
148 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 ...
user avatar
  • 113
0 votes
1 answer
649 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 ...
user avatar
0 votes
2 answers
764 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 ...
user avatar
  • 305
1 vote
1 answer
2k 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 ...
user avatar
25 votes
3 answers
2k 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 ...
user avatar
  • 151
2 votes
2 answers
366 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 ...
user avatar
  • 252
1 vote
2 answers
216 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 ...
user avatar

1
2 3 4 5 6