Questions tagged [original-vim]

The tag has no usage guidance.

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

How to generate random string with required length in Vim?

I am using this code for console log nmap cll yiwocll<Esc>p I wanted to add some random string inside this console log, assume 10 characters symbols length. How to achieve this?
hden mila's user avatar
0 votes
1 answer
57 views

External syntax highlighting

Is there a way (even theoretical) for Vim to use an external program for syntax highlighting? For instance a program that reads buffer content from stdin and prints single-character colour identifiers ...
ngn's user avatar
  • 163
0 votes
1 answer
162 views

Why is Vim telling me that 'no plugin to install' when I have installed a plugin manager (vim-plug)?

call plug#begin() plug 'https://github.com/AndrewLockVI/dark_ocean.vim' plug 'https://github.com/ErichDonGubler/vim-sublime-monokai' plug 'https://github.com/rafi/awesome-vim-colorschemes' call plug#...
Artisan's user avatar
  • 31
0 votes
1 answer
75 views

Some problems when building Vim from source locally

I want to enable python3 flag in vim and because I am not the sysadmin, I tried to build Vim from source. The basic procedure is Download vim source file ./configure --enable-python3interp --prefix=/...
Gabriel's user avatar
1 vote
1 answer
223 views

How to remove definition In between lines by coc-nvim

I want to remove the inline definition that come like this (underline parts): These are coming due to coc-nvim and I don't want to see them. How can I get rid of them?
Anurag Yadav's user avatar
0 votes
1 answer
101 views

How do I disable easymotion in terminal mode?

I'm using easymotion with all buffers and it works well but changing to terminal mode raises the issue. Thus I want to disable it in terminal mode for convenient. How can I do it? Thanks for your ...
Pham Hung's user avatar
  • 113
0 votes
1 answer
456 views

Show command prompt including commands issued before entering neovim

I've been using vim for a long time and got used to issuing: :! to peek at the command prompt behind the vim "window" working on Terminal.app in Mac OS where I can see old commands and ...
Alec Jacobson's user avatar
2 votes
1 answer
151 views

Autocomplete LateX citations in chapters directory

Currently writing my thesis using LateX, I'm trying to obtain autocomplete on my citations when writing the chapters. The directory structure is that each chapter has its own main.tex files (template ...
Jeanot's user avatar
  • 23
3 votes
1 answer
93 views

vim-workspace does not save set options

I want to have a persisting vim setting in my workspace. The vim plugin vim-workspace seems to be the obvious solution for this. Yet it does not save some options. For instance I want to have my spell ...
john's user avatar
  • 48
0 votes
1 answer
422 views

How do I remove a default file from runtimepath?

I have this line in vimrc but it seems do nothing. set runtimepath-=~/scoop/apps/vim-nightly/current/filetype.vim This file is from $VIMRUNTIME. I don't want to use vim default filetype settings. How ...
Pham Hung's user avatar
  • 113
1 vote
0 answers
56 views

Vim local statusline doesn't set up correctly upon open new window

I tried to write a small script to give the statusline distinguishable appearance on current and non-current window. The local active and inactive statuslines are defined by the following code: ...
Rekkhan's user avatar
  • 43
0 votes
1 answer
203 views

Why I can't apply colorscheme for GUI vim in Windows?

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May 2 2021 18:02:30) MS-Windows 32-bit console version Included patches: 1-2824 Compiled by mool@tororo Huge version without GUI. Features included (+) ...
Pham Hung's user avatar
  • 113
1 vote
0 answers
44 views

Strange code sequence <80>ýa <80>ý` recorded with -w

I was noticing when I exit Insert Mode using ctrl+[, and very quickly press ctrl+w q wanting to quit, every time I will end with ctrl+w dropped for unknown reason and a pending q. I tried starting vim ...
Masquue's user avatar
  • 81
0 votes
1 answer
1k views

"E16: Invalid range" when run command vim in terminal

I run vim -c 'vnew' and expected it run but it raised the error E16. What I want is auto run :PlugInstall when open vim but not using VimEnter. So I opened vim with -c flag but it didn't run.
Pham Hung's user avatar
  • 113
2 votes
1 answer
2k views

How to config to get good splash screen with Ascii Art or maybe a picture like Lunarvim and Spacevim?

I see in Lunarvim and Spacevim have the same appearance when is opened. Did they use the same plugin or have special configuration? Currently, I'm using Vim8.2. You can help me by showing your ...
Pham Hung's user avatar
  • 113
3 votes
2 answers
626 views

What's the difference between coc-emmet and emmet.vim?

I'm working in HTML and want to choose emmet support for neo(vim) but don't know where to start. What are the differences between coc-emmet or emmet.vim?
Pham Hung's user avatar
  • 113
1 vote
1 answer
89 views

How to get H and L commands to work properly in command mode

In vim's command mode, when I type 'H' the cursor usually doesn't go all the way to the top of the window, and 'L' doesn't go all the way to the bottom. To investigate the problem, I created a 60-line ...
David Levner's user avatar
0 votes
1 answer
391 views

Any ergonomic way to shift block of code to left and right in vim and neovim? [duplicate]

I have some key mappings for the block of code up and down vnoremap J :m '>+1<CR>gv=gv vnoremap K :m '<-2<CR>gv=gv So I tried to do the same with H and L vnoremap H <V vnoremap L ...
Pham Hung's user avatar
  • 113
1 vote
1 answer
141 views

Dump output using execute() in neovim

Currently, I am using nnoremap <leader>d :vnew +pu=execute('')<left><left> to dump output in both vim and neovim. I tried it with verbose imap <tab> but it didn't work nnoremap ...
Pham Hung's user avatar
  • 113
2 votes
2 answers
1k views

how to navigate to a file or a function using neovim or vim?

All, I am pretty new to NeoVim or Vim and i have setup vim for scala development. Everything else seems to be working fine. The only hiccup i have is i am not able to navigate to a file or function. ...
chetank's user avatar
  • 123
1 vote
1 answer
40 views

How to only join lines that start with multiple spaces

what is the global command that will join lines that start with more than one space? I have tried this but it does not work as expected: :g/ \{2,}//J Example: I want to turn this: 01:001:001 In the ...
Jan P's user avatar
  • 31
2 votes
2 answers
69 views

Sorting superscript numbers

I have the following text in a buffer: ² b ³ c ¹ a ⁰ ⁴ d The issue is that this is the text after running :sort (and :sort n ). My question is: why doesn't the superscripted numbers sort in the ...
Joe's user avatar
  • 287
2 votes
0 answers
83 views

Constant-update Words Per Minute in Vim?

I'm interested (mostly just for fun) in seeing my typing speed while working in Vim. I saw this post but this requires starting and stopping a function. I would prefer this to be a constantly updating ...
kipawaa's user avatar
  • 21
1 vote
1 answer
129 views

How to change the directory highlight in the terminal buffer?

I have a theme which is great apart from some minor things. I could already change the LineNr highlight and some others, but can't seem to change the directory highlight in the terminal buffer, which ...
neolith's user avatar
  • 133
0 votes
1 answer
131 views

How to escape a pipe (|) in my vimrc

I've seen How to escape pipe character in `:make`, `:grep` and friends How to escape pipe (|) in mapped substitution? https://stackoverflow.com/questions/29596150/use-to-diplay-tabs-in-vim But none ...
Siddharth Shyniben's user avatar
1 vote
1 answer
242 views

Run `vim -c <command>` before loading vimrc?

I'm adding some setup to my .vimrc, and what I want to do is to be able to run a command using the command line before the vimrc is executed. I tried vim -c 'command' but it runs after the .vimrc. The ...
Siddharth Shyniben's user avatar
0 votes
1 answer
326 views

How can use Tab to navigate completion list

I use both coc.nvim and Ultisnip for completion in vim. coc-snippet does not support some feature in Ultisnip so I use Ultisnip instead But I have a problem is <Tab> for trigger completion in ...
Pham Hung's user avatar
  • 113
0 votes
1 answer
153 views

Rebinding i (enter insert mode) and Esc (enter normal mode) to Ctrl-Space

Esc doesn't work for me for obvious reasons. So I started using C-c but I'm told that's bad practice. In addition it isn't as convenient as I like it to be. So I looked into binding C-Space and found ...
user1984's user avatar
  • 103
2 votes
0 answers
76 views

Vim command line bigger when tagbar is open

Vim's command line is bigger when TagBar is opened. I am using windows terminal but this happens in Command Prompt as well. What am I doing wrong? Or is there an option that I missed?
Garcia Adalberto's user avatar
0 votes
1 answer
76 views

vim autocompletion in vimscript

I wanted to make a vim snippet in my vimrc, without using a plugin. I want it to appear automatically when I type Ctrl-N iabbrev was good for short code addition, as mentioned in this post https://vim....
Chintu sharma's user avatar
1 vote
1 answer
133 views

Modify syntax highlighting dynamically

Is it possible to write a vim plugin that modifies buffer in real time? As a first step, would it for example be possible to modify syntax highlighting of unused variables as suggested in a similar ...
ffigari's user avatar
  • 137
4 votes
1 answer
114 views

Create new Highlight for C pointers

I am trying to highlight only the name of pointer without '->' I tried with syn region but all the pointer and component are highlighted when i use match: syn match PTR1 /\<[0-9A-Za-z_]\{1,\}[-][...
lilington's user avatar
2 votes
2 answers
111 views

Moving to special marks inside opfunc

I'm trying to write a opfunc which surrounds selected motion with two stars (bold in Markdown): nnoremap <localleader>b :set opfunc=BoldIt<CR>g@ function! BoldIt(type, ...) execute &...
mzcarlos's user avatar
  • 123
0 votes
0 answers
34 views

How do I avoid creating files that vim says have been modified, but when I recover them I find that the recovered and original are identical?

I often open a file in vim that is marked as "modified", but when I go through the process of recovering and diffing it with the original I find that the files are identical. I assume that ...
Shawn's user avatar
  • 11
1 vote
1 answer
36 views

Removing unique lines ending in a varialbe string

Here is a sample of my file sorted. The first part of the line is variable length, followed by Jump to Record #: nnnnnn aaaaaa Jump to Record #: 10 aaaaaa Jump to Record #: 22 bbb Jump to Record #:...
wgriffa's user avatar
  • 11
0 votes
0 answers
273 views

Use python through pythonthreehome and pythonthreedll?

I install python use msys2 in windows but i don't know how to put the path to vim Here is my vim --version: Here is where i install python3: And python3 dll: Vimrc config: I use python for run ...
Pham Hung's user avatar
  • 113
0 votes
0 answers
82 views

Install plugin for plugin

I'm trying to use nerdtree-git-plugin for nerdtree to be able to see git information within vim I'm using vim 8.2 and so have been using the built in package manager. I have the nerdtree files in ~/....
uroboros's user avatar
  • 101
1 vote
1 answer
187 views

What does multiple key combinations over a paragraph in the manual mean? That they're synonyms?

Searching for i(, and got a paragraph with these combinations above: v_i), i), i(, vib, v_ib, v_i(, and ib. Are all these synonyms?
Sebastian Nielsen's user avatar
1 vote
0 answers
97 views

Vim process hung on background systematically

Edit #1 - I found a plausible reason. I suspect that the Vim process got stuck o background whenever I closed a terminal window with Vim still running. I've been careful to :qa Vim and 'logout' the ...
Enrique Dominguez's user avatar
1 vote
0 answers
482 views

YouCompleteMe installation-problem with Vim, Vundle on macOS 10.4.6/hombrew

I tried to install YCM. After some faults, Vundle shows that the install is complete, but YCM-Server is down. When I ran install.py I allways get this kind of error ... ' fatal error: '...
CodingWithBeginnersMind's user avatar
0 votes
2 answers
456 views

How do I manage the activation of vim abbreviation?

I defined an abbreviation in vim like this: ab is Input() I know it is not good to use is as the abbreviation of Input(); here it is just an example. So every time when I type is followed by space, ...
user33128's user avatar
2 votes
1 answer
73 views

Indentation error on VHDL component instantiation

I'm finding some strange behaviour on indentation in VHDL, and have added a minimum example. It is very strange, as everything else seems to work perfectly with VHDL. Does anybody know how to fix this?...
Kent Odde's user avatar
1 vote
1 answer
348 views

ALE says packages of my project don't exist

I'm having this problem with ale where in java files, it sometimes gives an error message saying that some packages don't exist. However, I can run without any problems my projects once I compile them,...
Ayhon's user avatar
  • 21
1 vote
1 answer
1k views

Why does ViM use VimScript? [closed]

As a person that is interested in the tools used to build useful software Why does ViM need a built-in language such as VimScript ( VimL )? Why It cannot be just C?
Ellie Sacchi's user avatar
1 vote
0 answers
36 views

Autocomplete filename from current directory in current buffer [duplicate]

So i have a bunch of files in a directory. I'm editing another file which have broken links/reference to these same files, and i want to edit them. There isn't too much so doing it manually wouldn't ...
Nordine Lotfi's user avatar
14 votes
2 answers
9k views

Advice to add `set nocompatible` as first line of .vimrc

I recall (perhaps in the early 2000's) having set nocompatible as the first line of my vimrc and most Vim guides and tutorials recommending that practice. Some examples I could easily find online: ...
filbranden's user avatar
  • 28.4k
3 votes
1 answer
1k views

Why is `vmap` for both Visual *and* Select mode?

Vim has both Visual and Select modes. Select mode is similar to Visual mode in some senses, but different in that when a printable character is typed, Vim will replace the selection with that ...
filbranden's user avatar
  • 28.4k
1 vote
1 answer
181 views

How to set colors for vim warnings about existing swap files

Is it possible to set color for the warning message "Swap file XXX already exists! ..."? I couldn't figure out which highlight group it belongs to.
Longwu Ou's user avatar
1 vote
1 answer
115 views

Empty space between two &

I want to empty inner columns in a latex table, ie all the words between 2 &. How I can do it ? I have tried quite a few formulas like s/&*&/\& \&/gc but I just can't find ...
Alain Bertrand's user avatar
0 votes
0 answers
320 views

Vim not rendering text when moving up

I can move down until the last line of a file with no issues. However, when move up the text that was out of screen bounds does not render (as shown by the figure) until i press Ctrl + L to force ...
Roberto Rolo's user avatar