Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor.

learn more… | top users | synonyms

8
votes
1answer
2k views

Automatically close NERDtree when opening file

I have installed NERDtree 4.1.0. I have mapped <leader>n to :NERDTreeToggle<CR>. I would like to use this in a way where I can press <leader>n, then locate the deisred file in the ...
1
vote
2answers
774 views

How to disable scroll wheel in Vim

I am using Vim 7.3.829 on Windows 7, how can I disable the scroll wheel completely in the settings of Vim?
8
votes
3answers
381 views

How to break long lines in vim?

I have a quite big text file formed of blocks like Short line. Really long line. Short line. separated by empty lines, and I would like to use vim (on Linux) to break down the long lines and obtain ...
2
votes
2answers
22 views

How can I get a list of all misspelled words in a text using Linux?

I have a text that has a number of misspelled words. I'd like to get a list of all those words, so for a text like this: This is just a normall line with some speling mistakes in it. It would ...
1
vote
1answer
18 views

Is there a clean way to quit evim?

While fiddling with installation of vim and gvim from source, trying to release console-based vim from X dependencies, I tried to run evim to see what it is and whether it should be freed from X ...
0
votes
0answers
21 views

Solarized Dark + Gnome Terminal + Vim + Vim-Airline

I installed the solarized dark theme for gnome terminal using https://github.com/Anthony25/gnome-terminal-colors-solarized and then with Vundle installed ...
2
votes
4answers
171 views

Programming in Windows 8

I am a semi-experienced Linux user and I write my software explicitly from command line. If I need a compiler, I simply sudo-apt-get it, if I need to run a code I just execute it from command line and ...
1
vote
0answers
17 views

How can I find out the encoding of this corrupted Chinese text, which an online tool fixes correctly?

I have a text in Simplified Chinese, which, when read as UTF-8 begins with ´ÓºÜ¾ÃÒÔÇ°¿ªÊ¼, which the online tool from MandarinTools (first search result for Repair Corrupted Chinese Email) fixes to ...
1
vote
1answer
12 views

Why does mapping <ESC> start command line Vim in Replace mode?

I was having an issue where starting Vim from the command line was starting in Replace mode. I finally narrowed it down to this line in my config: nnoremap <ESC> ...
0
votes
0answers
9 views

“Cmd”+“Shift”+“N” works in MacVim but not terminal VIM

I use iTerm2 on Mac OS X 10.10 (Yosemite) and I installed YADR and that comes with all its configurations and mappings. One of the mappings maps Cmd+Shift+N to NERDTreeToggle. This however works in ...
34
votes
2answers
10k views

How to get vim to open multiple files into tabs at once

Is it possible to get vim to open multiple files into tabs, similar to the way the args <path> command will open multiple files into buffers? Doing something like :tabe ./* results in the error ...
17
votes
8answers
11k views

Vimperator copy/pasting

I'm trying out Vimperator. I mainly wanted it for the hjkl scrolling, and I like its "hint" system for following links. These two features are really all I need; I think. I don't mind the other ...
2
votes
1answer
32 views

How to push the original line down after copy and paste in Vim?

I just started with Vim recently and I got stuck with a basic problem! When I want to copy and paste more than one line of my codes and paste it in the other place, the original codes will not move ...
19
votes
3answers
42k views

installing plugins in vim

I had a real difficulty installing vim plugins on mac. I know for a plugin to be installed it has to be seen by runtimepath. According to vim docs, this is Macintosh: "$VIM:vimfiles, $VIMRUNTIME, ...
1
vote
1answer
58 views

tmux printing u'0x001b' and “]112” randomly

So I've lived with this problem for several weeks now, hoping that if I just let it happen enough, I would figure out the underlying trigger. No luck. tmux in bash in gnome-terminal in XMonad on ...
12
votes
4answers
3k views

Synchronize pasteboard between remote tmux session and local Mac OS pasteboard

Setup: I use iTerm2 on MacOS to connect to a remote server. The remote server runs tmux, in which I open files and edit in vim sessions. Problem: I can't copy/paste between the remote tmux session ...
3
votes
3answers
359 views

VIm copy & paste between apps as a non-superuser

I'm using a work computer so i don't have a root access. I've tried "+y, "*y, set clipboard=unnamed. It looks like my vim doesn't support +clipboard (version 7.0). I'm using Linux Centos 5 so ...
1
vote
1answer
20 views

Vim: Change color of window counter in tab line

How do you change the color of the window counter that VIM displays in the tab bar. I'm familiar with how to set highlighting on groups, what group applies to it? Below is an image of a vim session, ...
17
votes
3answers
8k views

VIM: What is the EX-mode for batch processing for?

The tutorial mentions that the Ex-mode is for batch processing. Since it is a nuisance, rather than a tool, for me, I would like to see some practical examples. Who uses it? Why? What is the EX-mode ...
4
votes
1answer
444 views

How do I increment strings in Vim?

I can increment integers in Vim using <Ctrl>-a. The docs seem to say that if I set nrformats to "octal,hex,alpha" (which I am trying to do with :set nrformats="octal,hex,alpha") then ...
0
votes
0answers
19 views

What is this? Debian Wheezy, Weird randomly occuring inputs

When I login in one of the extra virtual terminals there always come odd signs or control characters between my actual input. For example I type administrator and after the adm some garbage gets ...
0
votes
0answers
20 views

Vim and TMux keys coexits

I am configuring vim and tmux. I configured the tab navigation in vim like this: map <M-Left> <Esc>:tabprev<CR> map <M-Right> <Esc>:tabnext<CR> map <C-T> ...
20
votes
5answers
8k views

How do I edit an existing buffer in a new tab in vim?

Suppose I have started vim like this: vim foo bar Now I decide that I want each of those files in its own tab. Is there a way to do that without exiting vim and adding the -p option to my command ...
0
votes
0answers
32 views

How to embed Vim commands in text files to run when the file is open? [duplicate]

I remember that there is a way to run vim commands when a certain file (not type) opens and done through putting some vim stuff in the file but I cant remember what it was. I am not talking about ...
9
votes
3answers
3k views

How do I get the numpad to work in vim using iterm2 on osx with term=xterm?

My numpad works in iterm2 (bash), but it inserts characters instead of numbers in insert mode for vim. How can I get vim to recognise the correct escape codes. I have tried editing the escape codes ...
9
votes
7answers
15k views

What's the easiest way to delete Vim swapfiles I've already recovered from?

Sometimes Vim crashes and leaves me a swapfile. That's awesome. Then I open the file I was editing and Vim asks me if I want to recover. I do, thanks. When it's done, Vim tells me, You may want ...
4
votes
3answers
4k views

Vim Solarized dark theme looks weird on iTerm2

I just installed the solarized colorscheme following instructions on the project's page. This is what it looks like now: which is not like those screenshots on the official page. Any idea how to ...
1
vote
0answers
39 views

Can vim be used to view a growing file?

I often use vim's view for viewing files. Is there a way to use it for a growing file so that I can see the progress as it's happening? Something similar to tail -f or less +F I have two use ...
3
votes
2answers
82 views

Like the J command in Vim, but take a motion

I like the J command for joining many lines, but don’t like having to count how many lines I want to join. I’d prefer to give a motion. This can be faked with V{motion}J; is there a way that doesn’t ...
0
votes
0answers
22 views

Vim: mapping for <PageUp>, <PageDown> not working in vim, but working in tmux

Did a clean install a couple days ago, copied over my .vimrc and .tmux.conf, and now Ctrl-F / Ctrl-B doesn't page down / up in vim. Ctrl-F / Ctrl-B work in tmux when selecting text. Weirder still, ...
9
votes
8answers
3k views

Emacs equivalent to VIM ci"?

Does emacs have the equivalent of VIMs ci" command? Basically I want to replace the text inside a set of quotation marks. In vim I can ci) or ci] or ci} to "change inner *"...
1
vote
2answers
2k views

My vim plugins are not loading

I am on a Mac. I want to install vim plugins. The problem like always is that after following exactly the instructions on https://github.com/tpope/vim-pathogen the plugin fugitive will not load. I ...
0
votes
2answers
30 views

Gvim: Disable alt-letter behaviour inserting accented/unicode chatacters?

I was using alt-j, alt-l, alt-i and alt-k to go to the beginning/end/top/bottom of the current line. Over the years I noticed there's so much stress on the alt key, so now I decided to go try other ...
1
vote
1answer
32 views

How do I change the hilighted length of git commit-messages in vim?

I'm of the opinion that the orthodox 50-character limit on git commit messages is absolutely ridiculous. (Primarily because I think using an 80-character wide Terminal in 2015 is equally ridiculous.) ...
1
vote
5answers
508 views

What's the equivalent of Vim's matchit in Emacs?

With Vim's plugin matchit, you can match not only parens, but also a lot more language structures that come in paris (e.g. , if..end, do..end). Now I'm using Emacs (for fun!), and I wonder if there ...
0
votes
3answers
2k views

“.ssh/config” E212: Can not open file for writing

I'm new to linux. I downloaded an image of ubuntu 12 for VirtualBox and I want to configure the .ssh/config file to access via ssh to an application in development. I access /home/ubuntu folder and I ...
0
votes
1answer
40 views

after SSHing into another machine and starting vim, run terminal command in original terminal

I use ssh to remotely login to a machine where I subsequently work primarily from Vim. Sometimes I want to run some shell command on my original machine without leaving Vim. What is a non-disruptive ...
9
votes
4answers
5k views

tmux copy mode - select text block

I'm using tmux with vi keys, and copy/paste works fine as long as you're selecting one line of text, or if you have only one window. When I want to select a block of text (multiple lines, but not full ...
1
vote
1answer
549 views

Copy vertical text block in Vim on Mac

How do I copy a vertical text block in vim on a Mac? On a PC on would just do ctrl-c at starting point and ctrl-c at the end point and it would copy between these two coordinates. How do I do that on ...
2
votes
4answers
323 views

Copy and paste in VIM?

When I copy some lines in the VIM by marking and then right clicking sometimes there are some insert operations that happen and the letter 'p' is added to the file. How can I copy and paste without ...
1
vote
1answer
33 views

Vim: changing tabs to spaces

I know this question has been asked many times, but I'm not finding a solution to my problem in particular, mostly because I can't even really identify the problem. Here's the timeline of events: ...
0
votes
2answers
44 views

Vim | Can I Insert .gpeg and .gif images in my Vim Files?

Well I am new in Vim. So learning while working using Vim. I am currently learning Kivy (A Python framework) and taking some notes using Vim. However sometimes I need to save pictures (like .jpeg, ...
55
votes
6answers
32k views

How to show the current column in the statusbar in vim?

I would like to show the current column in the statusbar, as is common in many other text editors. E.g. it's good to know if you are around column 80 or above. How to show the current column in the ...
0
votes
0answers
26 views

Getting CTRL+V to work in Vim inside Conemu

Conemu uses CTRL+V as the short cut to “paste first line of clipboad.” I want this functionality when I’m interacting with the command-line, but when I’m in Vim I’d like Vim to handle it.
2
votes
3answers
2k views

Pair programming with tmux and Vagrant

Does anyone have a clear step-by-step guide for setting up a shared tmux session on a Vagrant vbox that my coworkers (on our local office lan) could SSH into? The articles I've found online only seem ...
0
votes
3answers
33 views

VIM How Can I Force VIM to Arrange Words According to My Choice?

Well I am writing and learning. I just want to write some text in this way.... - First line. Second line. Third line. But the problem is the lines are starting in this way... - First line. ...
3
votes
1answer
292 views

How do you create a vim key mapping that requires numbers before the hotkey (like <G>)?

I want to create a mapping like the G hotkey that jumps to a line (e.g., to jump to line 10: 10G). How can I do that?
3
votes
0answers
34 views

How to provide user “hints” to “diff”? [closed]

Sometimes, when I am diffing two text files (usually in vimdiff), the diff algorithm gets confused and associates the wrong lines with one another. Once that's happened, the rest of the diff is often ...
27
votes
2answers
5k views

vim freezes inside tmux

I'm using split panes in tmux - one being vim, other shell. Sometimes, around once a day, vim freezes. I can move between panes, perform any tmux commands, just vim doesn't react to anything. This ...
16
votes
4answers
11k views

In vim, how can I quickly switch between tabs?

In gnome-terminal, I can just press Alt + (1, 2, 3, etc.) to switch to specific tabs. I can also use Ctrl + (PgUp / PgDn) to cycle through tabs (admittedly less convenient, but it can be remapped). ...