All Questions

Filter by
Sorted by
Tagged with
2
votes
3answers
21 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
9 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
0answers
16 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.
2
votes
0answers
22 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
10 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
0answers
17 views

Command not working when mapped

I've mapped Control+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 ...
1
vote
0answers
13 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
17 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
2answers
25 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
47 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 ...
1
vote
1answer
38 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
0answers
39 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
21 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
27 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-...
1
vote
1answer
18 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
29 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
143 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
19 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 ...
1
vote
1answer
22 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
54 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
49 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
16 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
55 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
32 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
45 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
29 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
929 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
53 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
33 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
58 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
25 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
72 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
20 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!...
2
votes
1answer
30 views

Jedi module is not found (deoplete)

:checkhealth shows neither errors nor warnings about jedi: health#jedi#check ==================================== ## jedi #### Jedi-vim debug information ##### jedi-vim version - jedi-vim git ...
2
votes
1answer
104 views

Why it enters 'replace mode' automatically even with '--clean' flag in WSL?

To demonstrate the whole reproducing process, I make a video: https://youtu.be/UD38-wnwGnw As you can see, I enter my vim with '--clean' flag. No vimrc, no plugins, but it still enter the 'replace ...
1
vote
0answers
34 views

Remapping caps tock to ctrl and backspace while in vim only

I'm pretty new to vim, and I'm starting to discover it, and seeing how important the ctrl key is. I've seen that many remap the caps lock key to ctrl and escape at the same which seems really useful, ...
1
vote
0answers
23 views

When Pop Up menu is visible, <M-Key> no longer works

I use Alt plus h/j/k/l/w/e/ etc... to escape insert mode and move. e.g. <M-h> to escape insert mode and move left. However whenever the pop up menu is visible (pumvisible), then <M-h> ...
1
vote
1answer
47 views

How to make Vifm use Neovim to open files?

I have both GVim and Neovim installed. When I open a file in Vifm, it is opened in GVim and not in Neovim. How to make Neovim the default editor for Vifm?
0
votes
2answers
69 views

How do you :tag: every word of a line using substitution?

How do you substitute every word of a line, so that it becomes a useful vimwiki tag? Provided the following line: Word Compund_Word I want: :Word: :Compund_Word: I guess it involves some use of ...

15 30 50 per page
1
2 3 4 5
196