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

2
votes
1answer
4k views

How do I set up neocomplcache?

I just started using vim and saw a cool plugin: neocomplcache. My problem is that I can't get it to work properly. After installing, I took the example config from the help files of neocomplcache and ...
1
vote
0answers
9 views

How to get par formatter to not mangle paragraphs with non-space character prefixes, suffixes?

I can't get the par formatter to do what I want, specifically with automated prefixes and suffixes. Details: My .vimrc excerpt: set formatprg=par\ -w72reqh map t gqip The example input-to-par text ...
0
votes
0answers
13 views

Special characters are not displayed in terminal and vim

I'm using redhat release 5.6 (Tikanga). Recently I installed a patched font that support some special characters. I'll describe what I did. Installed the font in the ~/.fonts directory Run fc-cache ...
0
votes
0answers
9 views

Vim-airline text statusbar

After a manual installation or a pathogen installation, I am left with the following: Are there any further configurations to enable the colorful prettiness I am seeing elsewhere, such as:
8
votes
1answer
801 views

gvim redraw failure

I have a problem with gvim where the screen redraw partially fails. It's hard to explain but when I open a text file and page down or up the entire text file is not redraw properly. I have to move the ...
3
votes
2answers
205 views

Autoformat for Perl in Vim

I got a piece of code about perl: if ($a==1){ &err_report("$a"); while($b!=1){ &err_ok(); } } And, I want to format it in vim. After using command: gg=G, the code ...
3
votes
3answers
172 views

Map Ctrl-Shift-V to an action in vi

I want to be able to paste from the clipboard on gVim on Windows using Ctrl-Shift-V, just like in Terminator. However, if I put this on my .vimrc imap <C-S-V> "+gP The shortcut works ...
9
votes
2answers
4k views

How do I only dp or do just the lines, not the entire block in Vim diff?

I'm currently using MacVim (Snapshot 64) "Split Diff by..." menu option. The file is Django's my settings.py from version 1.3.1 to a fresh file from version 1.4. (Open the image on a separate ...
0
votes
0answers
7 views

vim Repeatable Motion that Distinguishes Vertical and Horizontal

I've been looking for a plugin like repmo that can repeat my previous horizontal movement and previous vertical movement separately, and reverse the direction of the motion. (e.g. 5j could be repeated ...
1
vote
1answer
12 views

Get vim to ignore conversion errors when reading file

I have a UTF-16 file with a BOM. I've set fileencodings to: set fencs=ucs-bom,utf-16le,utf-8,default,latin1 However because of one character on one line, vim does not auto-detect UTF-16 and ...
1
vote
0answers
6 views

Color Scheme with Vim on Android? [migrated]

I am trying to get a "solarized dark" colorscheme to work with Vim on android. Vim itself runs, and the plugin itself runs, but the colorscheme comes out wrong. I am using jackpal.androidterm app ...
9
votes
3answers
11k views

Configure VIM for copy and paste keyboard shortcuts from system buffer in Ubuntu?

How do I configure VIM for using Ctrl-c to copy and Ctrl-v to paste from system buffer in Ubuntu?
1
vote
1answer
22 views

Display trailing spaces in vim

I would like to have a nice and sweet display of trailing white-space in my terminal vim. This would allow me to remove them before closing the file. I am aware that this question is quite popular ...
0
votes
2answers
1k views

Change menu/ui language of vim to english

I search on google and I read several answers but I am unable to change the menu/ui language of vim to english. Im my .vimrc I have set langmenu=en_US.UTF-8 language messages en_US.UTF-8 but it ...
1
vote
1answer
43 views

How can I add a fixed amount of time to all “hh:mm” strings in a document?

I have a document that's a transcription of a video interview. The video itself has embedded SMPTE timecode as well as burnt-in timecode (BITC). The SMPTE timecode and BITC correspond to the time of ...
1
vote
1answer
199 views

How to “Edit with Vim” as administrator in Windows?

When you install gvim in Windows, you get a right-click Explorer context menu item: "Edit with Vim". Is there a way of either adding a "Edit with Vim as Administrator", or just changing the existing ...
1
vote
1answer
14 views

Vim NERDTree | Remap '<cr>' to 'go' | open file but remain in NerdTree window

I'm trying to remap Nerdtree keys so that <cr> opens a file but the cursor stays in the nerdtree window. Nerdtree has this capability by default and can be triggered with the g + o key mapping. ...
0
votes
1answer
19 views

How would I write this VIM command for `sed`?

I have a .csv with special characters that are wrecking an import I need to do. In VIM, I discovered away to remove the special characters with : :%s/\r//g This removes ^M from some of my broken ...
6
votes
3answers
2k views

What configuration will let vim show the buffer/filename in the status line even when only one buffer/file is open?

When I have more one one file open in vim (using split-screen), each commandstatus line (the last line in the window) looks like this: filename.txt 73,1 4% ...
1
vote
2answers
24 views

Vimserver on Cygwin

Following to this question, I discovered that I can use --servername <name> and --remote on my console vim executable under Cygwin. So I installed vim-common vim and gvim and I do not have ...
4
votes
5answers
12k views

How do you run Vim in Windows?

I just installed gVim, and tried using the usual "vim myfile.java" technique that usually works for linux to open up a file and edit it. But unfortunately, this doesn't seem to work. I've also tried ...
0
votes
1answer
17 views

Vim mapping characters in insert mode

OK this may be pretty basic question but I just learned how to make custom key mappings. I am trying to make vim automatically "end" two lines lower when typing "class" so I wrote following in ...
2
votes
2answers
391 views

Is it possible copy text from vim to a system buffer?

I want to copy text from vim, eg. by selecting in visual mode, then ctrl+insert and I'd like to have the copied text in system buffer, so I can paste it anywhere I like with eg ctrl+v. Is it possible ...
1
vote
2answers
56 views

Best way to increment numbers in one line in Linux [on hold]

I have one line with lot of entries among which is also time. ('DEFAULT',17,NULL,'2014-07-14 10:30:00','Something','2014-07-14 06:30:00',1),('DEFAULT',26,NULL,'2014-07-14 ...
1
vote
1answer
35 views

Pathogen - only some of vim plugins work

So recently I installed Pathogen along with a few plugins like NerdTree, and Solarized and they both work really well. Today I tried to install Ruby indentation plugin ...
0
votes
1answer
14 views

Command with localleader in gVim

I'm giving gVim a try, among others because it has a neat plugin for todo.txt. That nice plugin in it's readme description demonstrates its usage by saying to do x you should <localleader>x. ...
0
votes
1answer
323 views

Change pythonpath in Vim

I'm using Vim for Python coding. The problem is, that I'm writing in Python 3 and Vim settings contain only Python 2.7 paths. That does not allow me to use plugins (like python-mode) for autocomletion ...
5
votes
3answers
2k views

How can I test for plugins and only include them if they exist in .vimrc?

In my .vimrc I am trying to use ftplugin and obviously use some commands relating to that under the assumption that it was loaded successfully. However, I have now encountered a few old machines that ...
0
votes
1answer
23 views

How does vim know to syntax-color .hgrc?

With syntax on, vim syntax-highlights my ~/.hgrc file. How does vim recognize this file? How can I get vim to apply the same syntax coloring to a differently-named file?
0
votes
1answer
23 views

Configuring function keys in PuTTY for both Vim and Midnight Commander under tmux?

First off, I'm aware that I can use Alt+1 (through 9 and 0) to synthesize the respective function keys (F1 through F10) in Midnight Commander. It has helped me many times, but by default I still press ...
1
vote
1answer
31 views

How to set cursor to after last character in vim?

Why can't I insert at the end of a line in vim if there's no whitespace at the end? Let's take for example my SSH config file: I try to use $, l, e, but I can't seem to get to the end of the word. ...
3
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
1answer
24 views

Color scheme(s) in Vim not properly working

On Archlinux, using Vim 7.4 (installed with pacman), I tried to use the lucius color scheme. However, the moment I turned it on, all color went away. This happened in the Xfce Terminal emulator under ...
0
votes
1answer
201 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 ...
11
votes
9answers
9k views

Vim: execute the script I'm working on in a split screen

I'm working on a small python script, which needs frequent execution in order to debug and further develop. Can I split the vim screen and execute my script on one part with a keystroke?
2
votes
1answer
816 views

Set default editor for crontab -e invoked with sudo

I'm using Bash on Debian Squeeze. I just read this topic: change default text editor for crontab to vim I have exported both variables VISUAL and EDITOR to vim for normal user and for root. And this ...
12
votes
3answers
4k views

cygwin + mintty + vim backspace problem

I have installed vim, mintty via cywin on XP. The problem is when I try to hit backspace in VIM edit mode, the cursor move back a character instead of wiping the previous char. How can I tweak this ...
2
votes
1answer
150 views

How can I tell what command is running on the remote end of an ssh connection?

Tl;dr - how do I find the name of the command (eg $BASH_COMMAND) running on the remote end of an ssh connection? ... My example setup is two tmux vertical panes, LH pane runs a local vim session ...
1
vote
2answers
3k 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
28 views

How to reload a bak of etc/apache2/httpd.conf in terminal after bad changes made with Vim?

I changed the apache2/httpd.conf through vim in Terminal OS X yosémite as Su and quit saving changes. But in browser, the localhost sent the 403 Forbidden message "you don't have permission access to ...
7
votes
3answers
2k views

Can I get the Vim Ctrlp plugin to ignore a specific folder in one project?

The Vim Ctrlp plugin has a way to globally ignore certain folder names. Eg: let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$' However, I have an ignore rule that's specific to one project. I ...
0
votes
0answers
21 views

Vim color schemes and SAS programs

I have a problem that when I open SAS programs (.sas files) in Vim, the colors look very ugly (a mix of white and black background, etc.). Example here: This is how vim looks when I open a SAS file ...
0
votes
1answer
15 views

rename builtin vim command / remove from completion list

If a vim plugin and a vim builtin command share very similar names, is it possible to rename the builtin to something unambiguously different, or otherwise remove the builtin command from vim's ...
1
vote
1answer
14 views

vim - update file history more often

I was wondering if it is at all possible to have vim update its file history more often. For example, if I got into insert mode, and type 20 lines of code, exit, and hit 'u', it undoes everything I ...
0
votes
0answers
6 views

Pentadactyl tabopen all matching links

I'd like to open a whole mess of links, each in there separate tabs. I've got a pattern (here's its as simple as @ to identify all the links. So, i could type F@ and see all the links I want to open ...
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 ...
1
vote
1answer
33 views

Vim and Vundle error

Errors discovered when processing function vundle # scripts # complete .. <SNR> 47_load_scripts: line 7: E15: Invalid expression: E15: Invalid expression: Errors discovered when processing ...
2
votes
3answers
91 views

Notepad++/other editors: How to view same file in multiple columns with auto scrolling?

Is there any editor that allows me to have two columns, where the second column picks up after the last line of the first column? I don't mean cloning like in Notepad++ where I have two open copies of ...
0
votes
1answer
29 views

Solarized color scheme did not come out as expected after installation

After I install solarized, the background color didn't come out as expected. vim uses terminal black background instead of using solarized's blue background. My terminal is also set to ...
0
votes
0answers
8 views

Generate octave.info file to include documentation on additional installed packages

I use vim to write GNU Octave scripts and I have included the line autocmd FileType octave setlocal keywordprg=info\ octave\ --vi-keys\ --index-search in my .vimrc file which enables me to use Info ...