vim (Vi IMproved) is a text editor supporting different editing modes.

learn more… | top users | synonyms

0
votes
0answers
15 views

vim how to simulate press of canc/delete key with norm command?

With this line :execute "normal! A;\<esc>D" I do "normal" command wich permit to edit file without entering edit mode. Then I add ; after line(A in edit mode) and the simulate ESC press key ...
-2
votes
0answers
34 views

Vim editor with Ubuntu [on hold]

I want to learn the Vim editor. Could anyone recommend me a good course on the web? In fact, I'd like something of interactive and we could do some example. Thanks in advance! P.S. I want if you ...
1
vote
0answers
24 views

Disabling mouse in Vim disables indentation

I have Vim version 8.0.122 on FreeBSD 9.3 (installed with pkg). I have default global vimrc. I want to disable mouse support completely on my account, so I put set mouse= in my local .vimrc. It ...
0
votes
2answers
45 views

Can I remap ctrl-j and ctrl-k in vim?

I would like to remap ctrl + j to ctrl + d, and ctrl + k to ctrl + u for moving half a page down and up in normal mode. I have tried with noremap <c-j> <c-d> noremap <c-k> <c-u&...
0
votes
1answer
35 views

Disable viminfo completely

I'm trying to disable viminfo completely, I tried to add something in the ~/.vimrc, I tried 3 different methods, none of them works set viminfo='0,:0,<0,@0,f0,n~/.viminfo set viminfo= set viminfo=...
0
votes
1answer
27 views

How to know how many tabs are open in Vim?

I have a task where I have to take a look at 211 ruby files. I need to know how many tabs are open. Is there any way I can get some statusbar or something similar that can tell me how many tabs are ...
0
votes
0answers
10 views

Is there are significant performance boost from using --with-luajit instead of --with-lua?

Does building vim with --with-luajit make lua-related features that much more performant or is the speed boost negligible? Is there any real significant performance difference between --with-lua and -...
0
votes
1answer
13 views

Vim how to create .swp file manually?

Q: Vim creates .swp files for recovery. In case you fail to save, vim will be able to recover (at least some of) the file. How to create .swp files manually?
0
votes
0answers
28 views

How to stop any application to store text in PRIMARY buffer just because it has been selected?

I'm using the autocutsel trick in the .xinitrc : autocutsel -fork & autocutsel -selection PRIMARY -fork & to synchronize PRIMARY and CLIPBOARD buffers so I can yank text in vim and paste it ...
-3
votes
2answers
36 views

Place a character in the middle of every word in VIM

I have a file wth multiple lines that look like RUS.LEN.8 "0612" "1212" "0605" "0606" "0000" "2121" "0401" "1211" "0000" "0707" "0000" "0000" "1111" "0303" "0303" "0102" "0133" "0602" "0000" "0404" "...
7
votes
2answers
238 views

How to suspend VIM history?

When we edit a file, we usually do many UNDO in a row, say, 20 times. In VIM, that is usually performed by pressing u 20 times, and that makes VIM go "up" in the history stack 20 positions. If you ...
1
vote
0answers
30 views

What generates .pz~ backup files from .py files? [migrated]

I've been doing edit-save-run-bugfix-repeat on a Python test script, using vim as my editor. My directory now looks like this: -rwxrwxr-x 1 james james 458 Nov 29 23:02 test.pr~* -rwxrwxr-x 1 james ...
27
votes
4answers
2k views

Vim: what are all the possible swapfile extensions?

When you're editing a file in vim, it generates a swapfile with the same name as your current file, but with a .swp extension. If .swp is already taken, then it generates one a .swo one. If that's ...
0
votes
0answers
28 views

vim-nox installs python2 support by default

I try to install vim with python3 support. After a quick research, I learnt that vim-nox installs by default the python3 support. Except that, in my case, I have python2 support. The result of apt-get ...
-1
votes
1answer
21 views

Vim doesn't delete underlying lines in Visual Block Mode

In vim, by pressing Ctrl+V you can enter Visual block mode. When I select multiple lines by moving around with h,j,k and l, and press delete using d or D, the text gets deleted, but the underlying ...
0
votes
0answers
10 views

Racket CLI repl interprets tabs in text sent via tmux as autocomplete

I'm using vim, tslime, and tmux to send scheme code to the racket repl (v6.7) via the command line. I'm running on Arch Linux. When I do so, I commonly get the auto-completion warning: "Display ...
0
votes
1answer
35 views

run editor command when leaving insert mode in vim

I want to run a :command in vim when I exit insert mode. Specifically I want to run :GoFmt to format my code when I exit insert mode. Currently it runs when I save the file but sometimes I want to ...
3
votes
2answers
59 views

How can I access a Vim process after closing its terminal on macOS?

This what I get when I run the ps command: $ ps PID TTY TIME CMD 14777 ttys000 0:00.25 -bash 19716 ttys000 0:00.15 vi templates/base.html 8240 ttys001 0:00.11 -bash 8284 ...
0
votes
0answers
26 views

How can I pipe coloured grep output into vim [duplicate]

So I am trying: grep --color -irn '.' -e "start" and I'm getting my coloured search results with different colours for my files and my search terms. What I can't do is, whenever I pipe this output ...
1
vote
1answer
33 views

How to stay in zoom in tmux if select-pane command issued?

I'll explain what I mean. Suppose I've created a horizontal split and then zoomed the top pane. Then when I'm pressing C-w-l bounded to select-pane -R (I'm using vim and TmuxNavigator plugin to '...
3
votes
1answer
64 views

How to get the file path of a buffer?

I know that the register % contains the full path of the current buffer. But how to get the full path of another buffer by its number? Is there such a function/command in VIM? I want to explain how ...
3
votes
1answer
62 views

Cannot enable TrueColor support in tmux via overriding terminfo

dist: Arch Linux. I have an st build from AUR and tmux from official repo. In st I meet a good TrueColor support that works with last Vim version via termguicolors option. But when i tried to bring ...
4
votes
1answer
47 views

vim - How to escape filename containing single and double quotes mix?

Let's say i create a filename with this: xb@dnxb:/tmp/test$ touch '"i'"'"'m noob.mp4"' xb@dnxb:/tmp/test$ ls -1 "i'm noob.mp4" xb@dnxb:/tmp/test$ Then vim . to go inside Netrw directory listing. " ...
0
votes
1answer
34 views

filename with newline in vim's Netrw Directory Listing

Create a filename containing newline character: $ touch $'a\nb' When i do vim ., the filename split into multiline: I can only select one line and press enter. Then it act as new file and show this ...
5
votes
1answer
58 views

Suppress recovery files when editing sensitive files in vi, nvi, and vim

I'm writing an application that maintains an encrypted database containing extremely sensitive information including cryptographic keys and passwords. The application is paranoid about using memlock, ...
2
votes
1answer
29 views

How to navigate back from text/binary file view in Vim's Netrw directory listing?

I use vim.gtk3 . to navigate current directory in Netrw Directory Listing view. I know I can press x to act like xdg-open. I also know I can press - to navigate to parent directory. But if I press ...
0
votes
1answer
78 views

vim cut&paste not working in Stretch / Debian 9

Upgraded here a few VM servers to Debian 9. Now when in ssh, we cannot copy and paste between remote terminals. The cursor seems to be doing the movements, and marking the text, albeit in a funnier ...
0
votes
0answers
29 views

:Explore deletes current buffer, didn't use to

I used to be on ubuntu 14.04, where :Explore always worked fine, but I recently updated to 16.04 (vim version 7.4, patches 1-1689), and the behaviour of :Explore has changed. (unfortunately not sure ...
0
votes
1answer
38 views

Vim ignores “set hlsearch” in vimrc. Setting manually works fine

I may be wrong, but I seem to recall hlsearch being on by default. Setting it explicitly in .vimrc has no effect, though running :set hlsearch within vim turns on highlighting as expected. I've ...
2
votes
2answers
60 views

Vi replace the currently searched string

I know how I can search and replace a string, either globally or in a selected area. But I have the habit to go over a word and then hit * to search for that word. This won't only search for the word ...
0
votes
2answers
92 views

Need to type special symbol in vi

I want to type ½ in vi mode but it is coming with extra character ½. I am pressing ALT+0189. I have searched a lot on the same but failed to get. Please advise.
1
vote
2answers
44 views

Vim, put off indent in global config

My vim have a auto indent future for C files. I can run it and :set nocindent to change this behaviour. I don’t know what to add to the global configuration file. I’ve tested these lines without ...
0
votes
2answers
26 views

How can I use vim to remove first few characters of the selected lines using commands?

How can I remove the first few characters like remove ; from the selected lines using commands? I switched into the insert mode, but can't figure out how to do. ;extension=php_bz2.dll ;extension=...
2
votes
2answers
135 views

Set solarized scheme on LXTerminal

I installed the solarized theme for vim but it looks quite ugly. The documentation says, that I should also enable the solarized theme in my terminal, which is the LXTerminal. Therefore I tried to ...
1
vote
1answer
48 views

vim inside screen : Indentation displayed incorrectly

When I used vim outside a unix screen to edit a file, vim displays the file correctly. However , when I open the same file inside a unix screen, the indentation "seems" to become messy. I say "seems" ...
1
vote
1answer
99 views

What vim theme is this?

I just ssh'd into a machine and I like the vim theme a lot. Does anyone know it's name? Here are a few screen shots:
1
vote
1answer
58 views

Editing and compiling files on a remote server with Vim

I am editing a bunch of files on a remote server. I can connect using SSH (public key or password). I use Vim as follows: vim scp://user@server//path/to/file.cpp I need to use Vim on my computer ...
1
vote
0answers
57 views

Unable to install vim on a RasPi (Raspbian GNU/Linux 7)

I am trying to install vim onto a RasPi (i.e., Raspbian GNU/Linux 7 (wheezy)), but while executing "sudo apt-get install vim" I am getting an error. I have tried searching for a solution, but I haven'...
1
vote
1answer
33 views

Vim printoptions wont accept two options simultanenously

I want to print my code into a pdf file, and I found this answer very helpful. However, I want the generated pdf without header and with line number. From the comment and internet, I found I need to ...
1
vote
0answers
38 views

Conque-GDB in vim: how to set size

I use Conque-GDB as a plugin in Vim. Here is how my Vim now looks like: As you see I also use the Nerdtree and I can easily change its size: https://codeyarns.com/2014/05/08/how-to-change-size-of-...
0
votes
1answer
47 views

How to debug `Error while processing function` in `vim` and `nvim`?

TL;DR How to find where exactly vim or nvim error started (which file?) when I'm interested in fixing the actual issue and not just removing the bad plugin? Anything better than strace and guesswork ...
8
votes
2answers
415 views

Where is vim after pkg install?

Taking the first few shaking steps with FreeBSD. Started by installing vimI thought, but: root@rpi:~ # pkg install vim Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All ...
3
votes
1answer
42 views

How do you get the contents of the buffer as a string in vim?

I am trying to use the buffer contents in various functions.
-2
votes
1answer
45 views

First several characters of clipboard deleted when pasting in Vim

When I paste items into Vim, the first several characters are routinely missing. This has caused some serious errors. If I paste into gedit, for example, all lines are there. I can go back into Vim ...
0
votes
1answer
21 views

How can I get vim to show document path in Terminal?

OS X 10.11 adds a nice feature to Terminal.app that interprets control sequences of the form ESC ] 6 ; file://hostname/<path-as-URL> BEL as specifying the "document" which is currently being ...
1
vote
1answer
28 views

How to prevent `git difftool` from calling another `vimdiff`?

I have git configured (like below) to use vimdiff as difftool and compare another pair of files without prompting as soon as I call :qa. It's awesome. The only problem is sometimes there are ...
0
votes
1answer
24 views

screen - sent bash to background?

So I was working on homework on my school's unix server and I think I totally messed up a screen session. I was going a little trigger/keyboard happy in vim and accidentally did :w2 instead of just :w,...
2
votes
3answers
41 views

How do I overwrite rows of text going down in vi / vim?

In vi / vim I would like to overwrite rows of text going down the page. Similar to overwriting characters in a line - I press R, then paste and the charcters are overwritten, but instead I want to do ...
0
votes
1answer
22 views

Is there any vim plugin provides brackets jump features?

I am looking for a vim plugin which can provide the following functions: automatically let the cursor jump one character ahead and insert a tag(<++>) at the original place if the user input a pair ...
1
vote
0answers
35 views

XTerm does not update vim changes properly

im currently using XTerm emulator and vim 7.x and when I for instance delete a word the curser is set correctly back to the previous word, but the deleted word is still shown. Same problem when ...