Category "vim"

Run gofmt on vim without plugin

I want to run gofmt on save on vim without installing any plugin. This is what I have tried (inspired by https://gist.github.com/tbrisbout/a91ac3419440cde40c5f5

Keep cursor line vertically centered in vim

I want the cursor to be constantly in the middle of my screen in vim. I am not very comfortable looking constantly down to the end of the file. What commands in

How to set terminal tabs titles in zsh, to vim filenames

I am using a oh-my-zsh shell in an Apple terminal (2.11) in full screen, and by default the name of the tabs is the name of the program being run (eg. vim). Is

How to set terminal tabs titles in zsh, to vim filenames

I am using a oh-my-zsh shell in an Apple terminal (2.11) in full screen, and by default the name of the tabs is the name of the program being run (eg. vim). Is

how to auto focus editor on Xcode

I am new on Xcode and crazy using vim mode for everything. On Xcode, whenever I switch to different tab on editor view I have to use keyboard shortcut command +

writtenctags: "tags" doesn't look like a tag file; I refuse to overwrite it

I am using vim with ctags. every once in a while I get the next error message: writtenctags: "tags" doesn't look like a tag file; I refuse to overwrite it. my

Launching vim from python in a new terminal and waiting for it to close

I am trying to create a python script that Launches a new terminal window (in my case terminator) Open vim on a temporary or designated file Waits until vim/te

How to search and replace function for "vscode vim"?

i have tried but didnot find a way to search and replace in vscode with the vim keybindings plugin. The vim console doesn't take regular vims search and replace

how to present function name at statusline on vim

When I open any .c file, I hope that function name will be present at statusline according to current cursor position. set statusline=%<%F%h%m%r%h%w%y\ %{str

macOS Mojave 'ruby/config.h' file not found

When I try to build vim(8.1.0509) with ruby support(--enable-rubyinterp) on macOS Mojave(10.14.1) I get error: In file included from /System/Library/Frameworks/

Why is the word file get highlighted in .py files in the Vim text editor?

The word "file" in python is not a keyword, but my Vim highlights it as if it were. Can someone suggest a fix and explain this strange behaviour? It keeps messi

Mapping select-all, copy, paste in vim

I have the following map in my vimrc: nnoremap <C-a> ggVG nnoremap <C-c> "*yy (might be because I'm in visual mode here?) nnoremap <C-v> "*p

Run a command but stay in the shell vs exit

I know that in vim I can type :terminal <command> % to run a command on the file in the current edit buffer. For example and to simplify what I want to d

Vim Regex Negative Look Arounds and Capture Groups

Say you have the following text foobar bar And you want the following as your desired output foobar foobar You could use the following regex s/\v(foo)@<!(b

preview not working on neovim 0.5 on windows 10 with fzf

i'm running neovim 0.5 with fzf-vim on windows 10 and can't seem to make preview to work. my init.vim per below: call plug#begin('~/AppData/Local/nvim/plugged')

:W undoes all my changes in Neovim. How do I turn this off?

I've checked mappings in Neovim but can't find any mapping to :W that would cause an 'undo all'. It's frustrating when I accidentally type :W instead of :w. Whe

Vim plugins overwrite line numbers

After upgrading vim plugins. It appears that some Plugins (Ace, Gitgutter, Coc) overwrite the line numbers. The following screenshot shows the problem at line 2

Using "register recall" to search and replace doesn't work when register contains newline character

I've been using the answer to Using visual selection or register for search and replace as follows: v visually select y yank :%s/ Ctrl+r " This works fine in mo

Proxmox/NoVNC prevent/remap the ESCAPE key

I am working on a proxmox VM using standalone NoVNC window in fullscreen. Here the ESCAPE key is mapped to leave the fullscreen mode. The problem: I am using a

Vim, how to make Netrw to replace current open file instead of split opening new window, when you press preview or create new file commands?

Recently I've been using netrw. I've put these four lines on my .vimrc: let g:netrw_banner = 0 let g:netrw_liststyle = 3 let g:netrw_winsize = 25 map <C-n