All Questions

Filter by
Sorted by
Tagged with
2
votes
0answers
17 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
20 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
27 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
24 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()&...
4
votes
2answers
581 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
49 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
25 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
30 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
43 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
24 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 :)
0
votes
1answer
11 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
23 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
24 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
19 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
66 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
66 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
40 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
46 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
24 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
102 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
32 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
39 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
68 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 ...
1
vote
1answer
38 views

Making custom command behave like “:echo” with respect to quotes

This command works without errors: :echo v:oldfiles->copy()->filter('v:val =~# "txt$"') (see :h method, :h v:oldfiles, :h v:val and :h =~#) I want to create a custom command / ...
0
votes
0answers
12 views

C# neomake linter

I would like to use nvim more for C# however I am having a maker error I can't fix. My Omnisharp didn't work either but I still have 'YCM' as a backup for now. The MSBuild in my path is from the VS ...
0
votes
0answers
14 views

NERDTree - Removing square brackets from around read only symbol

I've seen there are several issues on GitHub concerning square brackets around file/folder symbols in NERDTree (for instance this, which is on vim-devicons' repo, rather than NERDTree's) None of them, ...
0
votes
1answer
11 views

Going up one dir in NERDTree keeping the old root open, together with all its open children, recursively

I do this, $ tree . ├── dir1 │   ├── dir11 │   │   └── hello │   └── dir12 │   └── hello └── dir2 ├── dir21 │   └── hello └── dir22 └── hello $ cd dir1/dir11 $ vim then I open ...
0
votes
1answer
29 views

Vim Fugitive not loading

I have recently been trying to separate my neovim config into multiple files. After moving everything involving vim-fugitive and vim-gitgutter into a separate file, git-gutter is not loading and I ...
0
votes
0answers
27 views

If fileformat is “dos”, why am I seeing carriage return (ascii 13) characters in my text file? [closed]

I am using gVim 8.1. I run set ff? on my logfile and it says "fileformat=dos". So that would imply that the line endings gVim expencts are "\r\n" (a carriage return "CR" ...
1
vote
1answer
60 views

How to toggle relative number for all opened windows?

I have this in my .vimrc: nnoremap <C-a> :set relativenumber!<cr> This toggles the relative number feature only in the current window. Is it possible to toggle it in all opened windows ...
2
votes
1answer
36 views

Base16 theme disable bold

I've recently installed Base16 theme and having issues disabling Bold text, I found the customization snippets and have the following in my .init.vim (NeoVim) : function! s:base16_customize() abort ...
0
votes
1answer
14 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 ...
1
vote
1answer
44 views

How to perform an action on search matches?

How can I visually select all text highlighted by a search in order to run a command on it? And if it's possible, how can I capitalize the selection?
0
votes
1answer
23 views

Change default character for comments

The assigned character for comments is " for vimscript. But i want to change it to some other character (like * or # for example). Based on this post, it seems like the string setlocal ...
0
votes
1answer
20 views

Ignore error on specific character in .vimrc

I'm using the accepted answer in this post, and as such, tried using the character * in my .vimrc, but it seems to generate E20: Mark not set as error, which i want to ignore (only for the instance ...
2
votes
3answers
156 views

Execute command for multiple files

I find myself often in the situation in which I want to run multiple vim commands on a multiple files. Consider file1.txt, file2.txt, file3.txt I would need to run :retab and then some :%s/ /, / for ...
2
votes
1answer
33 views

Evaluate an expression from visual selection in Python

I'd like to be able to select a part of a line, send it to a python interpreter, and have the selection replaced by the expression result. The use case is for doing math in Markdown documents: 1. Text ...
1
vote
0answers
26 views

Neovim steals line of screen

I try to switch to neovim because vim had turned slow. But neovim has the irritating habit of showing two status lines at the bottom of the screen. Is it possible to merge them into one? neovim: ...
0
votes
1answer
33 views

Weird powerline symbol background in iterm2

I am experiencing a weird background color of powerline symbol in iterm2, it doesn't match with that of status bar. however, in alacritty, the background color are matched. In iterm2: In alacritty: ...
0
votes
1answer
17 views

Escape for double quotes not working

I'm trying to search for quotation mark, but it seems it doesn't work: \v^\s"\zs\"+ is what i tried. Though I'm well aware it need to be escaped...I tried: \v^\s""\zs\""+...
1
vote
1answer
16 views

Unable to select templates with vim-latex

I have Vim on Ubuntu 18.04 and I have sucessfully installed the vim-latex package. When I open a .tex file, vim regognizes it as latex and the plugin kicks in (I have already struggled with this a few ...
1
vote
1answer
24 views

Is there a function which returns the filepath at the cursor?

I'm looking for a function(probably doesn't exist) which can return the filepath under the cursor. I know that there is a command/shortcut gf that helps me jump to that file if the file exists. But I ...
1
vote
1answer
32 views

Make fold feature act like Emacs's org-mode fold

In Emacs org-mode, folds use * at the start of the lines, and any * added consecutively, will add a level of indentation to the header. Furthermore, the header text placed after * or any number of it, ...
0
votes
0answers
33 views

Execute vimscript without saving first?

From my two previous questions, I learned about using :source %, @", and other tricks to execute vimscript. But as I noticed, :source % needs the file to be saved first, furthermore, @" and ...
3
votes
1answer
44 views

Is it possible to get vim-airline to make the statusline 2 or more lines high?

My statusline has too much information to fit on one line. It was already marginal, but now that I've rotated my monitor into portrait mode, it's a huge issue. I really like all the information ...
2
votes
1answer
40 views

text replace problem when target contains '&' symbol

I tried to replace if(cond1) with if(cond1&&cond2) in vim, so I typed the command :%s/\Vif(cond1)/if(cond1&&cond2)/g but the result is if(cond1if(cond1)if(cond1)cond2) and not if(...

15 30 50 per page
1
2 3 4 5
196