All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

vimtex conceal options and character substitution not working on Windows

I wanted to write and edit a .tex document as fast as possible, so I followed this guide, but I can't get vimtex to work properly. I would like to have Vim hide characters like $,\[ and replace some ...
0
votes
0answers
12 views

In a new line, moving to the columns of the beginning of the words in the line above?

Is it possible to have a 'smart tab' working as follows: 'move forward to the columns corresponding to the beginnings of the words in the line above' For example, in the situation below: I would like ...
0
votes
0answers
21 views

Command based on word under cursor not always working with symbols

As question imply, I'm trying to make a command based on the word under cursor, but that is between two character, in this example, asterisk. Inspired from here, I made: map <F3> "zyiw:exe &...
1
vote
1answer
56 views

Replace a character multiple times but within pattern

I am creating a yml file out of some variables. I have like 80 lines and they all have the pattern: my-first-command-line-var: {{ my-first-command-line-var }}, my-second-cli-var: {{ {{ my-second-cli-...
1
vote
1answer
9 views

Reopen a terminal window running an active job

How do I reopen a terminal window with an active job if I hide the terminal window? This is similar to the following question: Close vim 8.1+ terminal buffer without unloading. In this case, however, ...
0
votes
1answer
26 views

How to expand the splitted window using short key?

I have two vertically splited windows. I see from Ctrl+W s not splitting windows in Vim that Ctrl-W-| should resize the window. But it does not. Actually, nothing happens. If I manually resize the ...
1
vote
0answers
17 views

How do you highlight text surrounded by double equals

I'm using vimwiki plugin with markdown. I'd like to highlight text using double equals, which isn't standard, but is quite useful. Ideally, this should replace background (for instance, yellow) and ...
0
votes
0answers
12 views

Starting an interpreter and dumping the output to a new buffer

I am working on some Python code, and I would like to call an IPython interpreter from within a script. I have no problem doing this, however, I would then like to dump all of the output from both the ...
1
vote
1answer
21 views

How can I have the delete key remove newline characters in normal mode (like delete in insert mode)?

My question is similar to this one but for the i_<Del>. In insert mode, if I type <Del> it removes the next character, including newlines. In normal mode, I have to type x if the cursor is ...
0
votes
0answers
12 views

running job disconnects from buffer

I'm trying to implement tail -f buffer via job_start. It works well unless I switch to other buffer (:bn). When I return to tail-buffer, it's empty. let job = job_start(['tail', '-f', 'some_log_file'],...
0
votes
1answer
15 views

Change date format from MM-DD-YYYY to YY-MM-DD using a regular expression?

A file contains 03-01-2020 04-01-2021 03-02-2020 04-02-2021 03-03-2020 04-03-2021 03-04-2020 04-04-2021 03-05-2020 04-05-2021 03-06-2020 04-06-2021 03-07-2020 04-07-2021 03-08-2020 04-08-2021 03-09-...
0
votes
0answers
15 views

`ci{` doesn't detect the first {} on the line as `ci"` does [duplicate]

On the following line (the cursor is |): |some text "in quote" etc if I do ci", I'll end up like this: some text "|" etc which is great, because I don't have to manually ...
0
votes
0answers
15 views

Improve a repetitive copy-paste like pattern

To create new classes and data-related objects I find myself often doing the following pattern -- where I copy paste a 'base line' and then I need to update one or two values, for example: Here is a ...
0
votes
0answers
38 views

CTRL-] keys not working with very specific tags

So, I'm trying to use vim's help tags in my notes files, so that i can easily reach them (without using ex command or making a new keymapping). For that, i used: set tags=$VIMRUNTIME/doc/tags to set ...
1
vote
1answer
30 views

How to set spellfile with spaces

I am trying to give vim a global spellfile and a project-specific spellfile. The project-specific file is ./en.utf-8.add relative to the cwd. This works fine if the project directory has no spaces, ...
0
votes
1answer
21 views

switch toggle function - background

I'm trying to assign a key toggle to switch between dark or light background. I wrote this function: function ToggleBG() let l:bg='set background?' if l:bg==dark :set background=light ...
1
vote
1answer
27 views

Text object for a field between tabs

I'd like to define a text object for tab-delimited fields in a tsv file. So far, I have vnoremap at :<C-U>silent! normal! T<Tab>vf<Tab><CR> omap at :normal Vat<CR> ...
0
votes
1answer
22 views

How to copy and paste non English characters?

I'm using: Neovim v0.4.4 Mac v10.13.6 iTerm2 When I copy non English text, for example 中文(简体) and paste it to neovim, it become ???? The same thing happens to when I copy it from neovim and paste ...
0
votes
0answers
22 views

Read-only terminal in Vim

Is it possible to open terminal window (:term) in vim in read-only mode? I'd like to have this window interactive (for instance, to see compilation progress), but do not send keystrokes to it, so vim ...
0
votes
0answers
17 views

What's the best way to configure vim to unzip files with 7zip

In an answer to this particular question it said that it's enough to have unzip installed and available to make vim to unzip files on the fly. However what wonders me is there any way to configure vim ...
1
vote
0answers
13 views

When I use vim-latex's F9 bibkey completion key to find matches for my citations I am getting “E121: Undefined variable: foundCiteFile”

I don't know how to provide a minimum working example, because this was working before on these files. What has changed is that I updated to the latest version of Vim and moved my latex-suite ...
0
votes
0answers
8 views

Making clangd LSP recognizing GNU-specific headers

I have coc.nvim installed for autocompletion in vim. I usually include bits/stdc++.h(GNU-specific) in my files for competitive programming. I use the g++ compiler so I have no trouble there, but since ...
5
votes
1answer
128 views

How do delete the the next word or remainder of a line in insert mode?

New to vim/gvim, but I know that if I use C-w in insert mode, I can delete the word behind the cursor and from the beginning of the line to the cursor with C-u. Is there an easy way to do the rest ...
0
votes
0answers
25 views

How to override the terminal title bar preferences in Vim

I have only the Working directory or document and Active process name preferences checked for Terminal window titles. Then in VIM I use a custom titlestring. However, the title bar is displayed as &...
0
votes
1answer
17 views

Get the content of the first column

I'm writing a vim function to comment the selected lines in visual mode. Then I have written the following function to toggle the "#" character. I want insert the # when thereisn't and ...
-1
votes
1answer
27 views

Inside a mapping check if a variable is empty in vim

So i'm new to vim, and specially new to vimscript, and messing around i made the following code to get the name for a file and then create said file in a new buffer. I want a way to check if FileName_ ...
1
vote
0answers
18 views

How can you isolate the date portion of each request of a IP adress? [migrated]

How can you isolate the date portion of each request of a IP address if it's at the first line of each request from a log file using awk, creating a list of distinct dates, and then using grep to ...
2
votes
3answers
260 views

Select multiple words, one at a time, then replace them all

Goal: Select multiple words, one at a time, then replace them all. I'm new to Vim; I come from Visual Studio. I would like to achieve one important feature that helped me a lot in my productivity: ...
0
votes
0answers
29 views

`filetype plugin indent on` with `filetype=html` over-indents <script>

Since my last system update (I think), I have noticed this very annoying behavior. # vim foo.html # I go to insert mode, I type (no whitespace except newlines) <html> <head> ...
0
votes
0answers
38 views

vim-pandoc bibliography completion works only when writing a new file with GVim

I have installed vim-pandoc, as suggested here. When I open Vim in the terminal I get only 'Omni completion (^O^N^P) Pattern not found' errors. echo pandoc#bibliographies#Find_Bibliographies() returns ...
-1
votes
0answers
32 views

How to count the number of request per broswer (with vi -unix) [closed]

How to count and display the number of requests coming from the browser Safari. For example,:Safari,171682. By using a vi script on unix.
0
votes
0answers
27 views

<number>dd not doing anything on an ubuntu machine

I use 999dd as a goto command before pasting/overwriting the entire contents from the clipboard. For some reason this is not working (at all) on a specific ubuntu machine. Why would this not work be ...
1
vote
1answer
20 views

in-place replacement of code in HTML documents with TOhtml?

I'm working on some old HTML documentation, where are multiple code snippets (several lines long). I need to replace this old HTML-ized code with new one using modern styling. What I have now: ... ... ...
-1
votes
1answer
27 views

How to change editor mode from lua (or viml)

I know I can get the current mode, via mode(), but is it possible to set the current mode from viml or preferably lua (though I know a vim command/fn can be gotten to via the lua bridge). I know I can ...
1
vote
1answer
30 views

How to open ripgrep search in new tab

I'm able to search open a file in the current tab, but not able to open in a new tab. I was watching this tutorial, but I'm unable to open a file in tabs or splits. When I try ctrl-t I get this error
-1
votes
1answer
25 views

Remove right text (line numbers , ALL) in command line

I am using neovim and i want to remove the indicated text (0,0-1 ALL).
1
vote
1answer
16 views

How configure netrw to use 'l' instead <CR> to open files?

By default, netrw uses l to move the cursor one letter to the right in the file name. How can I configure netrw to use the letter l to open the file instead of <CR>
0
votes
0answers
8 views

How to get highlight style used for the text under cursor? [duplicate]

There is some text under my cursor that specific highlight is used. I do not know which highlight is that. I can type :highlight and randomly guess which could that be. Is there a method to just place ...
0
votes
1answer
30 views

Disable command but allow to write in command mode

I have fzf.vim installed, and therefore I have a :W command. I prefer working with buffers, so I save a lot with :w. However, accidentally using a capital W invokes :W which annoys me. I tried ...
1
vote
1answer
22 views

Single page version of docs

I would like to read the Vim user guide and reference docs and man pages on my Kindle Paperwhite. Does anyone know of a single page web readable version of the docs? Or even a PDF? Https://vim.help is ...
0
votes
1answer
35 views

how to map <C-q> to :q!

I'm trying to make Ctrl+Q quit vim automatically without saving. I thought this would be a very simple task but am stumped on why it's not working... I have the two following mappings at the end of ...
0
votes
1answer
21 views

Custom key binding for project-wide search and replace using FZF.vim Rg function?

I know that one can do a project-wide search and replace using the results of an Rg search in FZF.vim by doing the following: Run :Rg SEARCH_TERM Use Alt + a (or in my case, Esc + a, since I'm using ...
0
votes
2answers
38 views

How can I run this command (clang++ *.cpp -o main && ./main) in :term on vim?

In neovim, my code compiles and runs fine with this command: :term clang++ main.cpp -o main && ./main , but not in vim. When I run it in Vim the code neither compiles nor executes. I get the ...
0
votes
0answers
10 views

omnifunc with ctags for C struct members

I'm trying to setup Vim to use ctags to autocomplete struct members when I press C-x C-o, but I get Pattern not found error. I tried both with . and ->. Vim can find tags file because I can jump to ...
0
votes
1answer
27 views

How to map NerdTree commands?

I am used the vifm's hjkl key maps to navigate and open files. After installing NERDTree , I find it difficult as now the l key wont open file but will just move the pointer to the left( unlike in ...
1
vote
2answers
82 views

How can I delete whitespace backwards until end of previous word?

I want to delete whitespace backwards until end of previous word. Say, I have the cursor on the character "d" in the word "dog": horse cat dog If I press Ctrl-W (Insert ...
0
votes
1answer
19 views

Persistent highlighting (not affected by cursor movement) of selected lines?

I would like to highlight or color certain lines to mark them visually, and then move around freely in the file without affecting the selection. Is there a way of doing this? I know I can do 'v' to ...
0
votes
0answers
12 views

Eliminate highlighting of rendered code in vimtex

I am trying out vimtex and I think it is great but I am annoyed because the rendered code looks highlited or selected. I attach a picture that shows what I am talking about. At first I thouhgh it may ...
0
votes
0answers
20 views

Vimtex in Spacevim: conceal persists even on cursor line

I am new to (space)vim and I tried to make vimtex work in spacevim. Following the documentation, I added the layer: [[layers]] name = 'lang#latex' in init.toml. Opening a .tex document then the math ...
0
votes
0answers
19 views

How to create a new Vim 8.0 spelling dictionary?

I'm using Vim 8.0 along with it's excellent spelling feature to check text documents for errors. I need create a custom spelling dictionary by copying the en_us dictionary and modifying it. The ...

15 30 50 per page
1
2 3 4 5
199