All Questions

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

How to show the currents char code in ruler

I want the ruler made to show the current characters code. This code differs from encoding to encoding. This is because I have to handle different file comming from users. Some from Unix/Linux, most ...
0
votes
1answer
79 views

Periodic W11 “File has changed” warnings when reading file

I'm on Archlinux with vim 8.2.2380. Since running updates yesterday, I'm getting W11 warnings periodically just by having a file open in a buffer which has changed on the FS (e.g. when opening log ...
1
vote
1answer
10 views

How to move backwards between windows?

Ctrl-w w moves to next window. Ctrl-w p is not the symmetrical of Ctrl-w w, it moves to last window at first, but then moves back to where it was.
1
vote
1answer
45 views

Using vim // gvim with unix file format under Windows 10 + Cygwin gets errors from both

This is the second of two errors posted tonight. As mentioned before, I did re-install vim/gvim 8.2 to make sure I'd installed it as administrator, as instructed, to make sure the batch files, etc., ...
0
votes
1answer
19 views

mouse to highlight text puts vi into some kind of Visual mode

only on osx (not on Ubuntu ) when I hightlight text while in a terminal ( iterm2 3.4.8 ) vim shows some kind of notice saying Visual and then across top of terminal a banner appears saying Looks ...
0
votes
0answers
9 views

Delete a file in netrw without confirmation?

When I press D or <Del> over a file in netrw, it asks confirmation. How to avoid this message?
0
votes
0answers
17 views

Can I map a netrw command and its arguments to a key?

I have this map: nmap <buffer> <F3> mX So one I press <F3> it opens a prompt so I can type a command. Can I give the command also in the map above? something like: nmap <buffer&...
0
votes
1answer
19 views

How can I apply shell command on the selected files in netrw

I want to apply a shell command on two selected files, my command is: convert +append image1.png image2.png output.png How can I do that for two selected images in netrw? However, to make the process ...
0
votes
0answers
13 views

vim highlighting: only overwrite background, not foreground color

I have highlighted keywords and characters in bold and in different fg colours (with syn match). When I create an area highlight (e.g. between [ ] or ( )) the character and keyword highlighting is ...
0
votes
1answer
8 views

vim netrw problems on Windows 10

The weird behaviour I was seeing included: :Ex might open an empty window Use of - as a shortcut to go up to the parent directory in netrw, would make the entire shell non-responsive (or at least, ...
0
votes
1answer
26 views

Syntax highlighting for uppercase headings using === or — syntax

In Vim, without using any markdown plugin, headings like # Uppercase heading # lowercase heading lowercase heading ================= lowercase heading ----------------- get highlighted, while ...
0
votes
0answers
10 views

Characters in spellcheck words

I write a lot of documents in LaTeX. Often, I like to add people's names to my spell check dictionary in order to simplify the spellcheck. However, sometimes the names I want to add include accents or ...
1
vote
0answers
15 views

How to show where the word is found when using “auto complete” if it's “The only match”

When I type some letters and hit CTRL+P, vim shows a list of possible words that may complete my letters. On the left of the list, it shows the completed word. And on the right of the list, it shows ...
0
votes
2answers
44 views

Is it possible to make Vim give me suggestions based on the libraries that I have on my system?

Let's say I create a folder called folder on my HOME directory. Let's also say that I enter this folder and create a node.js file called code.js. If I open this file with Visual Studio Code and I ...
0
votes
1answer
22 views

Can I execute the make command only on selected lines?

Let's say I have the following script: sudo apt update sudo apt upgrade sudo apt install jq sudo apt install jo If I use the command :set makeprg=bash\ % | make inside Vim, the system will ask me my ...
0
votes
1answer
91 views

Why are empty files with names as 4 digits being generated by VIM?

I've been using VIM on a virtual machine running Kali Linux to write python scripts on a shared folder on my Windows 10 host operating system, but these empty files with names as 4 digits keep being ...
4
votes
0answers
60 views

How to get bold comments in vim

I am trying to add bold comments to my vim files. What i mean, is to be able to get something like this: I saw other articles like this that allow to toggle bold comment. The proposed solutions from ...
94
votes
8answers
24k views

How do I debug my vimrc file?

I have a problem in Vim, and I think it may be in my vimrc file (or have been told it could be my vimrc file). How do I verify this? If it is my vimrc file, how do I know where exactly the problem ...
0
votes
1answer
31 views

How can I comment multiple lines on NeoVim?

On Vim, when I want to comment multiple lines I always use the following procedure: 1. select the first caracter of your block 2. press Ctrl+V ( this is rectangular visual selection mode) 3. type j ...
1
vote
1answer
545 views

Where does gvim find font options for its `guifont` pick list?

In gvim, :set guifont=* brings up a GUI panel from which one can choose a font family, weight, slant, and size. Where does gvim find these fonts? I'm using Cygwin's X-windows. While the scheme for ...
0
votes
1answer
19 views

What does <special> do in a mapping?

While reading the code of some plugins, I found the key <special> being used. Typing :h <special>, :h <Special> or :h <SPECIAL> yields nothing. I tried to search for it (/\c<...
1
vote
1answer
33 views

How can I return to the file that I'm editing when I execute it from inside Vim?

Let's say that I have the following node.js script: console.log("test") If I use the command :set makeprg=node\ % | set autowrite | make I'll execute this node.js code and see the following ...
18
votes
3answers
8k views

When to use the after/ directory?

I understand it's the place to put things that should have the final say and not be overridden by another source, but I'm unclear on how to decide when to put something in, say, ~/.vim/after/ftplugin/ ...
1
vote
1answer
33 views

Inserting abbreviation from file

First, I apologize if this is a trivial question. I have the following file (main.ab) defining a Python snippet: def main(args): ... if __name__ == '__main__': args = ... main(args) And ...
0
votes
0answers
14 views

How to find all function in runthime by Telescope

i'm using a lot of plugins in neovim, for each plugin , we have a lot of function How can i grep all function by telescope :Telescope find_call then run this function if possible
0
votes
1answer
22 views

Bind :w to ASCII bell?

My question is a little weird. I'm using the Visual Studio Code Vim plugin to write my master's thesis. VS Code has an 'autosave' setting, which I have enabled, which means I don't need to use :w to ...
4
votes
1answer
44 views

Register for your last action (.)

Vim has a lot of useful registers from which you can access the contents of various actions. There's ": for the last command in the command line, "/ for the last search, ". for the last ...
0
votes
1answer
12 views

Using “(?=<)” in regex leads to “E866: (NFA regexp) Misplaced ?”

The following command should output the string "st": :echo matchstr('test', '\(\?<=e\).*') However, it leads to the error mentioned in the title. Reading :h E866 didn't help much. I also ...
0
votes
0answers
23 views

How dose colorscheme file working when python.vim file not exist?

I deleted python.vim in ~./Vim/vim82/syntax directory, and define colorscheme.vim in ~./Vim/vim82/colors directory. The colorscheme.vim contain this code call <sid>hi('pythonNumber', s:...
0
votes
0answers
63 views

What does “bound to github” mean?

The lastest Vim documentation has this paragraph: Neovim A Vim clone. Forked the Vim source in 2014 and went a different way. Very much bound to github and has many more dependencies, making ...
1
vote
1answer
255 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&...
0
votes
1answer
38 views

vim-test :TestSuite return message Not a test file

It's a really simple setup. I'm actually following along with the modern vim book. (I've been using vim emulation on IDEs for years and want to fully dive in). Anyway, my project structure is: ...
3
votes
1answer
89 views

line numbers in vim -H reversed

Recently I installed vim 8.2 on Windows 10 and vim 8.1.2269 on Linux Ubuntu. Both are compiled with +rightleft option. When I use gvim -H or vim -H (without vimrc file) and run :set number, I get line ...
1
vote
1answer
45 views

How to disable scrollbind and cursorbind after using vimdiff?

I have this issue where I need to both compare files, which I do using vimdiff, but also work on individual files with vertically split screens (vs). However, after I call vimdiff on a file, opening ...
0
votes
1answer
23 views

manually set syntax highlighting works from command-line mode but not from .vimrc/init.vim

The gruvbox colorscheme and syntax highlighting for C++ doesn't highlight some elements such as: string vector I have this: So I decided to change the colors manually using in init.vim syn keyword ...
0
votes
0answers
14 views

vim colorscheme not apply clearly [duplicate]

I apply colorscheme by writing in _vimrc file, but colors are working Partially. I brought source code of colorscheme from code-dark using Plugin Vundle. For explanation, upload the pictures. First ...
1
vote
1answer
13 views

Netrw - Lexplore is not an editor command

I was trying to configure vim to have a file explorer on the side with no plugins. I found the following script: function! ToggleNetrw() if g:NetrwIsOpen let i = bufnr("$") while (...
10
votes
3answers
15k views

How to switch between buffer and terminal

I have a vim's buffer and a terminal in the same vim's window but each time switch to terminal I can only exit it to go back to vim's buffer, Is there a way to keep terminal session but be able to ...
1
vote
0answers
46 views

colorcheme in vim is partially working. how can I apply the theme successfully?

Thank you for all yours advise that for help to improve my question. I'm not find yet how to resolve this problem in here. I'm really appreciate If you left the link about answer of this problem. ...
0
votes
2answers
32 views

How to execute a shell script from a line in a file with `%` in it

I have a shell script on a line alone in a file which I would like to be able to easily execute from vim. Normally I could simply use Y:!^R", but this particular script has % in it, which is ...
1
vote
1answer
24 views

replace simple pattern with sequential next line from another file

My file working.txt has 1000's of lines, which repeat in a simple pattern as follows: name date_ax name date_cd name date_ed name date_dc ...etc I need to replace each instance of name with the ...
3
votes
2answers
266 views

How can I print out the iskeyword characters?

When I use :set iskeyword? to view keyword characters, result for shell scripts is: iskeyword=@,48-57,_,192-255,- :h iskeyword says @ expands to any alpha character that the isalpha() functions ...
-1
votes
0answers
24 views

How to check for columns count of a line?

I am writing a plugin that highlight marks. I am getting out of range error, and I want to check the count of columns of a line. How can I do that in Vim or Lua? Answer in Lua is preferred.
0
votes
0answers
11 views

Are there any word processing apps that use Vim keymaps? [migrated]

I'm looking for word processing apps and text editing apps that have, say, a Vim mode, where you can navigate using Vim keystrokes. Plugins would work too. IntelliJ IDEA has IDEAvim but I'm not going ...
0
votes
1answer
23 views

Can I define a function with '#'-namespace in a file with hyphen '-' in its name?

I often see #-namespaces in plugins source code, e.g coc#status(), fzf#run(), fugitive#extract_git_dir. I would like to use namespaces in my own config, mappings and commands source code also. But I'm ...
0
votes
1answer
25 views

Change default tab behaviour for autocomplete to bash like tab

When I press tab for autocompletion (with the supertab plugin, but its applicable with vim's autocomplete feature as well), the selection scrolls from the bottom-most selection towards top with the ...
0
votes
1answer
12 views

Mapping Leader to a Ctrl combination not working/being ignored in NeoVim mappings?

I'm trying to map my leader to <C-s> and local leader to <C-q>, in my NeoVim (0.5.0) init.lua file. I know Ctrl-S and Ctrl-Q are software flow control, and I mainly use the terminal ...
0
votes
0answers
19 views

How can I edit a file and show a diff in a vertical split pane [duplicate]

I have a program file prog.pl and a backup prog.pl-20210615. At first they are identically. But then I want edit prog.pl and see the differences to the backupfile prog.pl prog.pl-20210615 text to ...
0
votes
1answer
36 views

Changing cpoptions only work in commandline

So i tried to change the setting from cpoptions, so i did: set cpoptions=aABceF on the commandline, where s for the star is missing (on purpose) and it seems to work fine but only if i do it in the ...
4
votes
2answers
120 views

Autocorrecting final sigma

When writing Greek, sigmas at the ends of words should have a different form. Can I do something automatically to replace: μῖσοσ by μῖσος, and so in all such cases?

15 30 50 per page
1
2 3 4 5
222