All Questions

Filter by
Sorted by
Tagged with
3
votes
1answer
22 views

Record all line-number fold-levels and restore fold-states (despite fold-level change)

I have found myself so extraordinarily frustrated with Vim's foldmethod=syntax behavior that I've contemplated dropping the editor entirely, despite being mostly happy with it for a few years now. ...
0
votes
1answer
496 views

Integrating autocomplete and snippets

I'm trying to set up an autocompletion/snippet workflow that's a bit complicated. This is stemming from needing a better workflow for latex. Right now I'm using coc.nvim and UltiSnippets but I am ...
1
vote
1answer
16 views

calling function from normal mode without *noremap

I realise this might be impossible, but thought it might be worth asking anyway. In vim, the typical way I map keys to functions is using *noremap commands. However the downside of this is the fact ...
0
votes
1answer
13 views

Using <alt> as alternative to <esc> doesn't work when popup menus are open

I'm in the habit of just hitting alt+[whatever] when I want to exit of insert mode (esc is just too far away - it's the one thing I can't for the life of me understand about vi/vim/etc.). This works, ...
3
votes
4answers
52 views

Vim search and replace “/” only from string between round bracket [duplicate]

I have string lets say count number of elecment when tra(XYixe0/en_in/old)='mid/2' rise='corse/2' I want to replace / from (XYixe0/en_in/old) to . My output string should look like count number of ...
4
votes
1answer
195 views

Vundle won't install plugins due to an error about AppData/Local/Temp

I am on Windows 10. I just installed Vundle and now I am trying to run the PluginInstall command. However, I am getting errors saying it can't open a file in AppData/Local/Temp. This does occur on all ...
7
votes
1answer
294 views

How can I spell check an entire buffer?

Is there a built-in command or plugin available to trigger spell checking over the entire current buffer, prompting me for each word it detects to either ignore, add to dictionary, or correct spelling?...
1
vote
1answer
14 views

Latex-Suite in Vim exits out of tex document if there's a warning in the aux file on compilation

I recently installed Latex-Suite using Vundle, and I use Latex to take notes. My notes are separate files for each lecture, but I have a master.tex file set up to compile each document together, and I ...
1
vote
1answer
44 views

Using vim as a terminal multiplexer: neovim or vim 8?

I've traditionally used vim as a text editor and tmux as a terminal multiplexer, but I'm trying to see if I can drop tmux entirely and just use vim for everything (except session attach/detach, which ...
3
votes
0answers
63 views

YouCompleteMe on remote files

I use YouCompleteMe on vim and it works great for me on the files in my local machine. However, when I open files in a remote server, for example, using :e scp://user@remote//path/to/file.cpp None ...
2
votes
0answers
26 views

Use external commands within venv virtual environment

Same question as Use Vim with virtualenv, except for these differences: I'm using bash, not zsh using venv, not virtualenv or virtualenvwrapper I have a keybinding to run the current buffer as a ...
1
vote
2answers
68 views

Go to next quickfix entry, removing current?

Is there a way to 'delete current, and cnext' so that when progressing through the quickfix list progress can more easily be seen, and, when all quick fixes have been made, the window automatically ...
2
votes
1answer
26 views

:GhostInstall does not work

Note: I am fairly new to NeoVim. So far I have installed plugins by simply unzipping the plug-in master folder into the directory /usr/share/nvim/runtime/plugin. In case there is no master folder I ...
4
votes
1answer
92 views

Pressing Shift-Backspace in insert mode types '^?' instead of backspacing

When I mess up typing an uppercase letter, I usually hold Shift while pressing the Backspace. Instead of backspacing, it types ^? (to my frustration). Google tells me that ^? is the "delete" ...
4
votes
2answers
242 views

How to delete entire function definition (C style)

How can I delete the block int Test() { // } when my cursor is before int (or even better when it is anywhere on that line)? The shortest I could come up with is d<line>G where <line> ...
2
votes
0answers
37 views

Best way to move cursor to start of variable declaration?

There are a lot of times were I have something like int x = someFunction(a, b, c); If my cursor is somewhere after the equals sign, is there a good way to put the cursor on the “s” in someFunction? ...
0
votes
1answer
46 views

Missing doc comment errors

Just started to look into VIM for my coding. I managed to set up some functionality with pathogen and want to make a slow start to learn VIM. the problem is that when I open a PHP document, I get ...
0
votes
0answers
26 views

How can I complete both words and WORDS? [duplicate]

I found this question, but mine is a bit different. When I write code dealing with arrays or classes like $myArray['myElement'] or document.getElementById("myElement"), I get annoyed because I have ...
0
votes
1answer
28 views

Matchit plugin is not working when I put it in my .vimrc. However it works when I run the same command manually inside Vim

I have the following lines in my .vimrc. colorscheme elflord set incsearch set guifont=Monospace\ 13 " <Ctrl-l> redraws the screen and removes any search highlighting. nnoremap <silent&...
2
votes
1answer
29 views

How to disable arrows in insert mode VIM

I want to disable my VIM-arrows in VIM, to get used to move the cursor using hjkl. I have tried a lot of different approaches found on this forum, however, i can't seem to disable the up and down ...
1
vote
1answer
29 views

Cross-platform way to execute command with clean environment?

A plugin I use executes: silent execute '%!cmd' which fails because of a particular environment variable I have set that deliberately modifies the behaviour of cmd. I can fix it with: silent ...
16
votes
2answers
2k views

Fix arrow keys displaying A, B, C, D in vi (not in vim)

I know that in vim I can add set nocompatible in .vimrc to avoid that arrow keys display A, B, C, D in insert mode. But I'm using vi Version 4.0 (gritter) 12/25/06. How can I obtain the same ...
0
votes
1answer
147 views

How can I emulate :shell command in Neovim?

There is no :shell command in neovim. :terminal opens a shell without previous output, while :shell contains all the output of the parent shell and all previous shells. Is there any way to emulate :...
0
votes
1answer
23 views

Is it possible to have something that displays the filenames of all my unfocused windows?

Both the statusline and the tabline only show the file I'm currently working (on on my current tab). Is there any built-in setting that can show the names of the files that occupy the windows I'm not ...
0
votes
2answers
53 views

What's the fastest way to open up .vimrc?

I'm just getting into Vim, and, as one might expect, I'm constantly adding things to my .vimrc. At the moment i'm using :tabe ~/.vimrc and I was just curious if there was a quicker command for getting ...
0
votes
2answers
53 views

Vi formatting to ignore a section of text

I do a lot of plain text file editing, and many times I need to mark a section of text as 'DO NOT FORMAT' as it is pre-formatted, or even contains ascii art. Many years ago I did this by marking the ...
1
vote
3answers
32 views

Control key bitmask

I find myself wanting to use vim one-handed now and again. Practicality aside, I want to define a function along the lines of: function! GetControlKey() echo "Control? " let key = nr2char(...
1
vote
1answer
22 views

Vim feedkeys in operator pending mode

I'm trying to build a very simple plugin that allows for pressing a keymapping <Leader>, to call a function that prompts for a single keypress: function! ControlKey() echo "Key → <C-Key&...
1
vote
2answers
20 views

How to ask vim where function or command was defined?

I'd like to know if there is an analogue to verbose map <key> (which shows the location that the map was assigned) for functions. For example I have a few Git plugins and I'd like to know what ...
0
votes
1answer
77 views

Cannot remove spelling error highlight from lowercase “vim”

The word "vim" is flagged as a spelling error in my documents. If I capitalize it, the error goes away. I don't want to capitalize "vim". Adding it to dictionary with zG or zg does not help. UPDATE ...
1
vote
1answer
32 views

vim8 - why does my 0read not read? [closed]

I have the following function in an autoload file: function! closet#FindSkeletonForFile() if exists('b:closet_skeleton') return 0 endif let b:closet_skeleton = s:closet....
3
votes
1answer
36 views

running external command on contents of register

I know I can use ranges/marks with the ! command like so: %! column -t etc. Is there any way to pass a register to the external command instead of the current buffer? I imagine it would look ...
1
vote
1answer
32 views

Search for more then one numeric value in vim

I am trying to search for numeric values in files. I use / command to start my search (/34587). However I need to add more then one search criteria (i.e. finding value 3487 and 09087 for instance). ...
0
votes
0answers
38 views

Escape newlines when breaking text

I'm using Vim to typeset some Latex documents, and resizing it to take up half my screen so I can reference other materials on the other half. Therefore, formatoptions+=t would be very helpful here. ...
10
votes
6answers
1k views

Delete n lines skip 1 line script

I want to create a basic Vim script that simply deletes n lines, skips 1 line and repeats until the end of the document. I don't care about specific matches, I just want to delete the line. For ...
0
votes
0answers
31 views

Running vim in Windows CMD messes with text wrapping when resizing the window

Normally, resizing CMD works normally for me, where the directory prompt (is that what it's called?) stays on the left side of the screen no matter the size of the terminal. However, if I open vim (or ...
0
votes
3answers
1k views

How do you add a local plugin in Vundle on Windows?

I am using Vundle on Windows gVim. I have a plugin that I am writing myself called hotdogstand that is stored in my local filesystem at vimfiles\hotdogstand, and it is not tied to a Github repository. ...
1
vote
0answers
28 views

Vim unknown colored block

My vim on WSL has some unknown colored blocks. The weird thing is it happens randomly and some colored blocks would disappear when I pass them using cursor. The following is my .vimrc settings: ...
2
votes
1answer
41 views

How to remap ci$

I am using the plugin vimtex. It offers the functionality (from the introduction of its documentation) Text objects ic ac Commands id ad Delimiters ie ae LaTeX environments i$ a$ ...
10
votes
2answers
2k views

What does `idem` mean in the VIM docs?

One example would be in the List docs: :unlet list[3] "idem
1
vote
1answer
18 views

How to get a function to print something to colon command and let user edit it?

I need to write a function that when executed it opens colon command and paste some stuff on to it and let user edit it before executing the command. for example function! EditRelativePath() :e ...
1
vote
0answers
25 views

Ignore a specific error

How to ignore a specific error (E303 in this case) globally? (don't display it in the console) I wish not to use try...catch if possible.
1
vote
1answer
58 views

Visual delete items from quickfix list

I am trying to delete items from the quickfix list, using the same delete interface I am used to, visual delete and dd. The .vimrc code I am trying to use to accomplish this is below. It does not work....
2
votes
1answer
36 views

Neovim 0.17.5: bash command top failed tty get

please be gentle, I am trying to learn neovim, coming from vim the command :!top executed inside neovim returns top: failed tty get shell returned 1 After googling, only search results from fzf ...
1
vote
1answer
47 views

How does p really works as related to content put in registers?

I've read this question and answer already, however it could not solve my doubts. As far as my understanding is correct, p always has the same effect (pastingutting the content of a bufferregister, ...
0
votes
1answer
34 views

Is it possible to disable the “nowrap” option on pymode?

I installed pymode plugin but it overrides my default setting (set wrap). According to :verbose set wrap?, the option is set by pymode. However, I'm not sure if it is possible to override the setting....
2
votes
1answer
47 views

I can't escape square brackets for syntax matching

I have the following code in my ini.vim: augroup HiParens autocmd! autocmd Syntax c :syn match Parens /[(){}]/ autocmd Syntax c :syn match Bracks /[\[\]]/ augroup End And highlighting is ...
0
votes
1answer
40 views

fzf vim - when configured to display filenames of matched items, how to filter on just content and not the file names

I've configured my .vimrc file for GGrep: command! -bang -nargs=* GGrep \ call fzf#vim#grep( \ ('git grep -i --line-number '.(isdirectory(expand(".git"))?'--untracked ':'--no-index '))....
2
votes
1answer
51 views

Change to standard regex syntax?

This might rustle some feathers, but I do not like how vim's regular expression syntax differs from standard regex syntax (I've read this answer, but I don't think this is worth remember two syntaxes ...
0
votes
3answers
205 views

How to restart vim from within vim?

Here's how I restart vim: $ vim :q $ vim Is there a way to restart vim so that there is no need to type the second vim in the shell?

15 30 50 per page