All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
20 views

Snippets for python

I am using UltiSnips for my snippets; until today, I have only used latex snippets with ultisnips, which I wrote in a file called "tex.snippets", in the UltiSnips directory which I have ...
0
votes
1answer
46 views

Close a “No Name” buffer opened with :e

How do I close a "No Name" which was opened with :e .. (explorer mode)? I tried Ctrl-^ and :bd!, but the buffer is still there.
2
votes
2answers
138 views

Is there a way to list recent buffer history?

I just started using buffers in Vim and I couldn't figure out how to list recent closed buffers. Is there a simple way (like :ls) to list those? Are they actually stored by Vim? Maybe I'm misusing ...
1
vote
1answer
13 views

Neovim keeps reverting shiftwidth size after `after/ftplugin`

I like to code with 4 spaces as a tab. I added this to after/ftplugin/sass.vim: echom "before sass file settings" set shiftwidth=4 " <---- Problem setting, keeps changing back to 2 ...
2
votes
1answer
20 views

Is there a way to make vim use a python3 interpreter which is not explicitely installed under Windows 10?

I want to use a certain python interpreter instead of an installed one. My gvim version is VIM - Vi IMproved 8.2 (2019 Dec 12 kompiliert am Dec 12 2019 13:30:17) MS-Windows 32 Bit GUI Version mit OLE-...
0
votes
0answers
19 views

Using multiple syntax groups for the vim conceal functionallity [duplicate]

I’ve recently tried using vim conceal to "symbolify" my code. Although it looks very nice there is a heavy drawback: all the concealed syntax that is turned into pretty unicode is always ...
4
votes
1answer
37 views

Delete and change key sequences are slow

When I use mapped key sequences which cause an immediate change in the file (e.g. cw, dw, D, C), i have a wait time of roughly 1 second. Other mappings which are just movement (e.g. 3w) or movement ...
2
votes
1answer
49 views

How to have Gvim 8.2 work with windows files containing a Unicode colon

Gvim 8.2 displays "Can't open file for writing" with a windows files that have a Unicode colon in the file name. Notepad, Wordpad, LibreOffice all work.
4
votes
1answer
75 views

How to map `/` to `/\v` in Normal mode without moving the cursor?

I've created the following simple mapping in Normal mode, since I don't want to enter \v for "very magic" regex parsing, every time I use the / search command: nnoremap / /\v However, after ...
2
votes
2answers
69 views

Vim syntax partial match

I'm trying to match a new line character on a Vim syntax file, I can make it work when I use the patern within Vim but when I put it in my syntax file it doesn't highlight when I have a new line and ...
1
vote
1answer
34 views

Default rulerformat

I like the default rulerformat, but I would like to add to it. However it seems the default value is hidden. If I try these: set rulerformat set rulerformat? I just get: rulerformat= Same for ...
2
votes
1answer
69 views

Unable to find files after setting path in vim

I open vim with vim -u NONE <filename>, so this ensures that the error is not due to vimrc or plugins. I use checkpath! to dump all files which are present in the path. :set path? path=.,/usr/...
2
votes
1answer
1k views

Using Vimdiff to diff two things that are not local documents

Every now and then I want to diff two random things (like a source-code vs some code I find online). I could obviously create two files locally and diff them, - but I was wondering if there was a ...
1
vote
1answer
23 views

How to invoke Linux shell env variable into vimrc?

How to invoke Linux shell env variable into vimrc ? I split vimrc configurations into multiple files and included these files in vimrc via :runtime [file]. This works well. :runtime vimrc.d/vimrc....
0
votes
0answers
26 views

Why session in Vim did not save buffer from other folder rather than ~?

I use gVim on windows and save my current working files to session. However, when openning old session, it did not load files from other folder except home folder ~ (where I store my _vimrc file). My ...
1
vote
0answers
18 views

Unwanted characters appear in an UltiSnips macro setup

I am new to vim and I am using a mac with vimtex, UltiSnips plugins. I am using the vim latex snippets found here (the tex.snippets file). Whenever I type "()", "{}", the text ...
0
votes
1answer
33 views

Command not working when mapped

I've mapped CTRL+Meta+n to :split | resize 15 | term. This command works when run from Vim, but when I put the command in my .vimrc, on Vim startup, I get the following error: zsh:1: parse error near '...
2
votes
0answers
17 views

Closing the file handle while keeping buffer open

I have a workflow where I edit a .org file using jceb/vim-orgmode which is located in my iCloud directory. I then have an app on my phone which also syncs and uses the same .org file. The problem is ...
3
votes
1answer
33 views

Syntax coloring is inaccurate for HTML files with CSS code in it

As you can see in the following screencast, when I open an HTML file with some CSS in it, there's some part of the file which does not show syntax coloring. Do you have experience of this? Is it ...
2
votes
1answer
53 views

Ignore a filetype when opening but not when using insert-mode popup-menu

Using :h wildignore, I can ignore certain types of files or certain folders when searching through them to open one of them. But that also means those files and directories will be ignored when I try ...
2
votes
0answers
37 views

Key Registration Problem

I have a problem that sometimes happens when I do type in Neovim. It does not register keys or mouse clicks correctly, which causes me to restart the iTerm session and rescue the working file with ....
2
votes
3answers
142 views

Find all files matching a glob pattern and add it to the quickfix window

My workflow is as following: I have a common project root where folders for projects branch of. In these branches I have markdown files with notes, snippets, various information. I mark todos for ...
1
vote
1answer
68 views

Concealing the code for `braket` package for LaTeX with vimtex + `tex-conceal`

I am using vimtex with latexmk and using conceal setting provided by vim and extending it with an additional plug-in : KeitaNakamura/tex-conceal.vim. Additionally, I use a package braket to encode \...
1
vote
3answers
82 views

moving through the doc, caret staying centered

I move around using the arrows ←↓↑→, never really got used to the hjkl thing. I know I'm supposed to use the hjkl thing. When hitting ↓, it reaches a point where the caret is on the lower side of the ...
14
votes
2answers
2k views

Remote pair programming in NeoVim?

I'm a NeoVim user and would like to be able to collaborate in real time with users, preferably also across other editors. Are there any open source plugins that enable remote Neovim←→Neovim pair ...
1
vote
2answers
30 views

Is there a way to quickly navigate to previously visited directories

I quickly want to switch between directories I previously visited without typing :cd and then the full pathname again and again. Is there a plugin or a way that can keep an account of the directories ...
1
vote
1answer
26 views

Is there a way to disable custom mappings while plugin functions are being executed in vim?

In my vimrc file, I use the following few lines to swap backtick and single-quote for convenience when I'm using marks: for first in ['', 'g', '[', ']'] for mode in ['n', 'x', 'o'] exe ...
66
votes
11answers
15k views

How to find and replace in Vim without having to type the original word?

I'd like to optimize my "find and replace" workflow in Vim. It's something I do often, as I'm sure most of you do too. Usually something along the lines of -- copy a block and change the name of a ...
0
votes
1answer
29 views

Vim keeps auto wrapping lines when in insert mode, how can we change this?

I'm not sure why this started to happen but recently vim seems to have begun autowrapping lines when in insert mode. It's pretty annoying. I use the following modules 'vim-ruby/vim-ruby' 'rodjek/vim-...
2
votes
1answer
19 views

A problem when use ALE for syntax checking and gvim for vivado's editor

VIM version: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 14 2020 22:03:16) OS information: Microsoft Windows 10 Professional version 2004 (OS Version: 10.0.19041) Problem Description: I use gvim ...
0
votes
0answers
12 views

How to determine including file in includeexpr

I've tried to convince vim to parse my import statements in EcmaScript modules. My goal is to use vim's native include-search (and definition search) tools without tags with vanilla EcmaScript. Though ...
2
votes
0answers
21 views

How to make certain conceal symbols get highlighted differently than others?

I’ve recently tried to make my python more readable using the conceal functionality. So now I went from this to this . Now what really bugs me here is that ƒ, ¶,the ¥ sign, the ℤ and 𝕊 symbols and ...
1
vote
1answer
59 views

How to map a key for a specific file

We can use the FileType autocommand event to create a customized key mapping for a specific type of file. For example, Spaceb could call different build tools for a Java file compared to a C++ file. I ...
2
votes
2answers
47 views

VIM mouse scrolling on Konsole show ^[OA at the top and ^[OB at the bottom of the page

function! GitBranch() return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") endfunction function! StatuslineGit() let l:branchname = GitBranch() return strlen(l:...
3
votes
1answer
43 views

Any ways to display lolcat output in Vim?

I known lolcat for a while now, and wondered if it was possible to display the text that it output, inside of Vim correctly. So i tried: :%! lolcat But while it update the buffer, the text doesn't ...
2
votes
1answer
110 views

Unable to use conceal with vim-javascript plugin

editor: NVIM v0.4.3 I have the following syntax file at ~/.config/nvim/after/syntax/javascript.vim syntax clear javaScriptFunction syntax match javaScriptFunction /\<module.exports\>/ ...
0
votes
1answer
65 views

How can I put the system clipboard into a vim register? [closed]

Basically the opposite of this question. This is on macOS. I copy from a program using ⌘C and I want to add that text to "" or "0 so when I cw or something similar I don't obliterate my copied text. ...
0
votes
1answer
32 views

Multiline context errors

Sometimes I see multiline popup-base errors in screencasts like the one below: Would anyone point me with a term or something to google it, as my ideas don't work for some reason? Here's configs of ...
2
votes
1answer
26 views

Automatically indent at the right level when moving to a completely empty line

I have this binding in my .vimrc to trick autointent into actually populating the next line with real characters, so that if I hit enter, leave the line, and click back to it, I can already be at the ...
2
votes
1answer
22 views

Embark colorscheme not working properly

I have installed embark using vim-plug. I have put it inside my vimrc. But everytime I open vim, it shows this error Error detected while processing /home/pial/.vim/vimrc: line 9: E185: Cannot find ...
75
votes
6answers
78k views

How can I easily move a line?

What is the command (or shortcut) to move a line up or down in vim? My current workflow is to yank (copy) the line and than delete that line and than to put (paste) that line.
1
vote
3answers
55 views

Repeat a command line multiple times

I want to turn one two three four into 'one' 'two' 'three' 'four' (I have surround.vim) I can do: ysiW', then do W. repeatedly until I've surrounded all words in the line But I would like to repeat ...
1
vote
2answers
146 views

Trying to undestand why using \zs in regex is not working as I expect

Consider the following test String: County,Age,Age_group,Gender,Jurisdiction,Travel_related,Origin,EDvisit,Hospitalized,Died,Case_,Contact,Case1,EventDate,ChartDate,ObjectId If use the following ...
34
votes
4answers
13k views

How can I easily create and maintain tables?

Here is (part of) a table I use in some documentation: +---------------+------------------------+---------------------------------------+ | TASK NAME | WHEN | DESCRIPTION ...
3
votes
1answer
57 views

How to list all help subjects?

How can I list vim help subjects (topics)? i.e., the {subject} argument for :h[elp] {subject} My particular use case is that I want to see help for my various vim plugins, and I don't know what the ...
2
votes
1answer
20 views

Substitute: previous match with confirm

If I do a replace like this: :%s/May/June/gc afterward I keep hitting y or n as needed. But sometimes it hit n on accident and need to go back. I read that you can use N for this purpose, but it ...
2
votes
1answer
50 views

Suddenly running :colorscheme breaks lightline

Suddenly, after a Vim update, I guess, when I run :colo some_color_scheme, the coloring of my lightline status bar is black and white, as you can see in the following screencast: Since I version my ...
1
vote
1answer
26 views

Get autocompletion of script names in $PATH

I would like to know how I could set up script names auto completion in vim ? For example let's say I have myscript.sh in ~/bin and ~/bin is in my $PATH, I would like to type mys in vim and get auto ...
3
votes
4answers
467 views

How can I easily indent inline comments?

I frequently have inline comments for variables: var1 = 0 # Var 1 var2 = 0 # Var 2 var3 = 0 # Var 3 var4 = 0 # Var 4 (This is in python, for example, but this question applies to C-Style ...
2
votes
1answer
17 views

Recursive map to <leader> not working

I have a german keyboard and \ is hard to reach, so I added the following line to my config: map ß \ This works fine for simple leader commands, and I did not have to change my leader command in case ...

15 30 50 per page
1
2 3 4 5
196