All Questions

Filter by
Sorted by
Tagged with
2
votes
1answer
63 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
2answers
63 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
19 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....
1
vote
1answer
30 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 ...
1
vote
0answers
14 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 ...
2
votes
0answers
16 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 ...
2
votes
3answers
138 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 ...
0
votes
0answers
23 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 ...
2
votes
1answer
35 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
29 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 ...
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 ...
0
votes
1answer
32 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 '...
1
vote
0answers
14 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 ...
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 ...
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
54 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
1answer
42 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 ...
4
votes
1answer
65 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
1answer
22 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 ...
0
votes
1answer
28 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
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 ...
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 ...
1
vote
2answers
145 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 ...
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
28 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 ...
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 ...
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
25 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 ...
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 ...
3
votes
1answer
56 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 ...
0
votes
1answer
33 views

clipboard not activated

I installed vim from their github repo. But I cannot seem to copy paste with from the system clipboard. So, I explored a little and tried to install vim-gtk package which would enable the clipboard ...
2
votes
1answer
48 views

VIM - How to select multiple lines that are not adjacent?

If you have the following text: line 1 line 2 line 3 You can hit CTRL+v on line 1 and hit j to select line 2. However, I want to select both line 1 and line 3, but not line 2. Is this possible?
3
votes
1answer
30 views

pressing keys in visual line mode will leave this mode?

I find that in visual line mode, if I press a shortcut to print the current mode, it will print n instead of V. Is this the expected behavior? My mapping: xnoremap <a-j> :<c-u>echo mode()&...
5
votes
2answers
936 views

Why can't I write to a file in the home directory?

I want to write to a file in the home directory, so I tried the following command: :call writefile(["foo"], "~/event.log", "a") But I got an error: E482: Can't create ...
1
vote
1answer
54 views

`:tab drop` in not supported in terminal

I use fzf to find/open files, but it always creates a new tab or replaces the current buffer. I want instead to use :tab drop <filename> but I get E319: Sorry, the command is not available in ...
-1
votes
0answers
20 views

Clipboard registry keeps switching back and forth between + and * registry

I have 2 vims, one on android and one on linux laptop. I have to keep switching which one to copy to so that other app can get the registry content . For example, I just copied data from firefox to ...
-1
votes
0answers
26 views

create a new file with default encoding of utf-8? [duplicate]

How to make vim to create a new file with default encoding of utf-8 ? My android vim always create utf-8 encoded file while my laptop always creates non utf-8 file. HOw to make laptop vim to have ...
1
vote
1answer
34 views

How do I enable copy/paste between vim and tmux in both two directions?

In a tmux session, I'm running vim in one pane and a terminal in another pane. Recently, I figured out how to enter visual mode in tmux but it doesn't help much now. Can I yank selected text from a ...
1
vote
1answer
64 views

Comments for github flavored markdown with vim-commentary

vim-commentary is a great plugin for commenting and uncommenting lines. However if some filetype isn't supported, as per documentation, one can do the following: (see FAQ) autocmd FileType apache ...
2
votes
1answer
29 views

How do I change vim cursor color

I use vim version 8.0.707. My cursor blinks but make the character disappear half the time. I'd like it to behave as usual: display the negative color. How can I do that please? Thanks in advance :)
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 ...
1
vote
1answer
26 views

autocmd BufNewFile to use template and then run command (to move cursor)

I have a template being used like so: autocmd BufNewFile ~/Documents/wiki/diary/*.mkd :silent 0r !vimwiki-diary-template.py But earlier in my autocommands the cursor position is being set which ...
2
votes
1answer
25 views

Is a smart text object possible?

Is it possible to create a smart text object for i), i], i}, i>, i' and i"? The text object would represent the first innermost object it can find. For example, with cursor on the plus sign ...
2
votes
1answer
22 views

matching digits and repetition in autocmd BufNewFile

I've got a template for vimwiki diary entries that's invoked via this autocommand: autocmd BufNewFile ~/Documents/wiki/diary/*.mkd :silent 0r !vimwiki-diary-template.py But I want to be able to ...
4
votes
1answer
68 views

How can I write all named buffers?

I would like a command that saves every buffer that has a filename. :h :wall gives this: *:wa* *:wall* :wa[ll] Write all changed buffers. Buffers without a file ...
1
vote
1answer
20 views

How to fix the huge indent

I am using nvim to edit tex files. I don't know what happened. All of a sudden, tens of blank lines emerged before each line of codes. I think maybe I screwed it up by doing something wrong ...
3
votes
1answer
77 views

What's t_TE and t_TI added by vim 8?

First let me show a screenshot below. In the modeline, a strange sequence of characters(>4;m<ESC>[>4;m<ESC) is shown. And not only in the modeline, I have seen such similar sentence in ...
0
votes
1answer
22 views

Can't use python inputs in Vim

I'm new to Vim. I ran the code print("Hello world") name = input("Name: ") print("Hello",name) and then ran it using :w !python and got the result Hello world Name: ...
1
vote
1answer
44 views

What are the benefits and use cases of relativenumber?

I have tried the relativenumber option several times, and I really don't get the point. People say that it's easier because they don't have to do the mental math of how many lines to go up or down ...
1
vote
1answer
51 views

How can I make vim ignore a filetype plugin's makeprg setting?

I am using a plugin that sets makeprg to some value specific to the filetype's programming language. I want to use my global setting instead, because I also use Makefiles. How can I do this? Thank you!...

15 30 50 per page
1
2 3 4 5
196