Questions tagged [original-vim]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
36 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 ...
0
votes
1answer
28 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 ...
0
votes
0answers
28 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 ...
0
votes
1answer
21 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 ...
0
votes
1answer
30 views

autocomplite code and insert shebang

Morning Guys, I want to to add some functions to my vimrc and want to achieve e.g.: type :bang into vim => it adds a shebang into the file. Or when I type class foo:<ENTER> it auto add except ...
2
votes
0answers
21 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?
0
votes
1answer
26 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....
1
vote
1answer
19 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 ...
4
votes
1answer
61 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,\}[-][...
1
vote
2answers
57 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 &...
0
votes
0answers
28 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 ...
1
vote
1answer
29 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 #:...
0
votes
0answers
16 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 ...
0
votes
0answers
44 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 ~/....
1
vote
1answer
179 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?
1
vote
0answers
33 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 ...
0
votes
0answers
395 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: '...
0
votes
2answers
57 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, ...
2
votes
1answer
25 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?...
1
vote
1answer
121 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,...
0
votes
1answer
553 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?
1
vote
0answers
34 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 ...
10
votes
2answers
4k 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: ...
1
vote
1answer
300 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 ...
1
vote
1answer
65 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.
1
vote
1answer
50 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 ...
0
votes
0answers
118 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 ...
0
votes
1answer
68 views

Keybind for moving a file using netrw from outside of netrw

I wanted to be able to move/rename a currently open file using netrw. The typical concerns are: Closing the old buffer Actually moving to preserve file attributes (so no :saveas) I'm aware of some ...
1
vote
3answers
55 views

Most efficient way to insert numbered columns into formatted text using standard Vim commands?

I sometimes need to insert auto_incremented, numbered columns on other people's machines so I'm looking for a good way to do so without relying on any custom plugins, macros, or scripts; standard Vim ...
1
vote
2answers
85 views

How to delete a character that is present between two specific characters from every line in VIM?

I have a CSV file in which data in a row are present in following way: ID, Name, State, Score, Rank In the Name Column, data are in "some Name" form. But there are many entries in which a comma is ...
5
votes
1answer
234 views

Parsing winlayout() For Toggling Multiple Windows At Once

When working in vim, I like to have a toggle-able terminal window that I can bring with me from tab to tab. This works by tracking a buffer, and opening it in a new bot split (if it isn't visible), or ...
3
votes
3answers
1k views

How can I use different vim setting for different filename?

In most cases, I want to use the same setting. However, when I write the makefile file, I need to use tab instead of space, so I need to execute the :set noexpandtab for all the makefile file. In ...
2
votes
1answer
606 views

How to disable arrows in insert mode VIM

I want to disable my VIM-arrows in VIM, to get used to move the cursor using hjkl. I have tried a lot of different approaches found on this forum, however, i can't seem to disable the up and down ...
1
vote
1answer
69 views

"Press ENTER or type command to continue" -writing second command returns to the editor mode

When I write first command I get the "press enter or type command", even if I try to type second one it returns me to the editor mode, even though I would like to stay on console. I am new vim user.
1
vote
1answer
176 views

How can I remove the word "tabs" at the beginning of the tabbar in airline-vim?

I would like the tabbar to start with the first tab not with "tabs". "tabs>1 main.tex>2 section_01.tex> <tab 2/2"
3
votes
1answer
68 views

How do I pick a line and write it to an external file?

I'm searching through a big text file and want to copy certain lines to another file - there is no specific pattern, I need to visually inspect and copy those lines to an external file. The command :...
0
votes
0answers
69 views

startinsert mode starts with NSERT -- at top

When I use the command : vim -c "startinsert" sometextfile Vim starts with the characters NSERT -- at top. The cursor is placed on N and I can write over the whole thing. If I use space, the ...
0
votes
0answers
40 views

How do I fix <DEL> behavior on macOS in VIM 8.1?

I've recently installed "huge" VIM 8.1 with Lua support (on macOS via MacPorts). This installation is side-by-side with my "normal" VIM 8.0 which lacks Lua support, so I have access to both versions. ...
1
vote
2answers
91 views

Read-only mode in Vim while using cscope?

I am traversing through a C code in Vim using cscope. Sometimes while traversing, some key gets pressed or mouse gets right-clicked and the Vim enters in insert mode, and it creates a mess to undo the ...
3
votes
1answer
4k views

Why do I suddenly receive "Error detected while processing function <SNR>30_Highlight_Matching_Pair"?

I suddenly receive Error detected while processing function <SNR>30_Highlight_Matching_Pair when I want to write parantheses or when moving over parantheses. I can turn off these error message ...
0
votes
1answer
230 views

why are the results of the pwd command and the getcwd() function the same in vim?

I found that using the :pwd command is the same as using the :echo getcwd() command in the commandline mode of vim. Is pwd the same as cwd? Is there a difference between the two? As follows: I am ...
2
votes
2answers
845 views

How to make vim open two windows when opening a directory or file with netrw?

I want to achieve two effects about using the netrw plugin for vim. EFFECT ONE: I have a test directory.Here is its directory structure: MINGW64 ~/test $ ll total 1 drwxr-xr-x 1 uooki2 197121 0 一月 ...
3
votes
1answer
113 views

Macro "oend^[Ores^[" results in new line "end2es". How?

I don't usually have this much trouble debugging issues, but I'm starting to get stumped. The line doesn't happen when typing the macro out (running it by hand). In fact, it's part of something I ...
1
vote
2answers
2k views

Is there a way to open header file in c?

I'm trying to configure vim for programming in C. I currently use YouCompleteMe and Syntastic for programming auto-completion and syntax-checking. But I came up with a problem. I cannot jump to a ...