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

1
vote
0answers
10 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
14 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:
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 ...
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
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
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. ...
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 ...
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 ...
1
vote
2answers
25 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 ...
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 ...
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
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
24 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. ...
1
vote
2answers
57 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
25 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 ...
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
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 ...
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
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 ...
0
votes
1answer
22 views

Mutt: let vim handle syntax highlighting when viewing plain text attachment

I use mutt for e-mail and I let vim handle plain text attachments. In my ~/.mailcap I have text/plain; view %s ; needsterminal That works fine, but it removes all syntax highlighting. I often ...
0
votes
1answer
16 views

horizontal scroll binding in vim

I'm using VIm 7.3 to edit 5 files side-by-side with vsplit, set scrollbind and set nowrap, it's quite useful, works well for vertical scroll, but the horizontal scrolling don't be sync. There is a ...
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
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 ...
1
vote
1answer
34 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 ...
1
vote
1answer
42 views

VIM + screen on remote (ssh) linux machine

The problem happens with my text in vim when I'm working inside of screen this is my .screenrc file defshell -bash startup_message off term screen-256color and this is what I can see in my terminal ...
0
votes
1answer
30 views

Windows: recursively search for, and execute, batch file from command line

I have a project with nested folders. I want to be able to recursively look up directories until a "build.bat" file is found, and execute it. How can I do this from the command line? (i.e. not a ...
0
votes
3answers
26 views

Where else are vim config files stored besides ~/.vimrc and /etc/vim?

I somehow (a long time ago, probably playing around with Rvim) made a keyboard shortcut which I now want to get rid of. The problem is, I have no idea where the config file that has nmap _ <- is. ...
1
vote
1answer
26 views

How to configure vim spellcheck to use two languages

In my blog I write blogposts in german language. But as it is mostly about tech there are many english words appearing as well. I recently enabled german spell-cecking in vim with set spell ...
0
votes
1answer
34 views

Map escape key to :q in vim in normal mode

I use vim as a viewer in midnight commandder and I want to quickly view and close a file. How can I map the escape key to :q in normal mode so that vim exits only if nothing is changed?
1
vote
0answers
31 views

Issues with GVim and permissions on Win7

I've installed GVim on my win7 machine but I'm having trouble with saving any files. I keep getting the e212: Can't open file for writing If I try to just quit with :q!, I get e138: Can't write ...
0
votes
0answers
19 views

Vim-SyntaxHighlight: Custom Syntax Highlighting With Vim

I'm trying to make my own syntax highlighting for vim. I was following the instructions in here (first answer) but I need to set a group for import and pack, and another group for func, lib, group. ...
0
votes
1answer
20 views

Vim map key combination of Control and Dash

Is it possible to bind <C--> (or <C-dash> or <C-minus>, I actually do not know) in vim to something, like <C-W><C-Q>? What does it mean <C--> in the default ...
0
votes
1answer
18 views

vim spellcheck: command or function to dump all bad words to file

I frequently need to correct files that have numerous spelling errors. Spellcheck tags all these words, but is there a command or function within vim that will dump all these tagged words to a file?
2
votes
1answer
30 views

How to make vim truly reopen a file as a cpp file?

I have a file filename.fs with C-like syntax content. Vim opens it as a Forth source, and I use :set syntax=cpp to get the correct highlighting. But later when I try to jump between words I encounter ...
0
votes
1answer
18 views

Stop Vim from automatically tw=78 line-break wrapping text files

I recently updated Vim, and noticed that whenever I open a .txt file, the option tw=78 is set. (Which makes Vim automatically break lines when they would have exceeded 78 characters.) I don't like ...
1
vote
1answer
36 views

Vim - automatically delete SWP file after recovery doesn't change the original file

When the Vim process is abruptly terminated (e.g. system crash), it leaves a SWP file. Opening the original file in Vim later gives the option of recovery. Most of the time the recovered file is the ...
0
votes
1answer
23 views

vim regex :s/^\s*\(.\)\+/\\\1/g only shows last character substituted

I need to prepend a backslash \ to each character in a string, excluding any leading whitespace. I believed the following would do the trick. :s/^\s*\(.\)\+/\\\1/g but it produces this result for ...
0
votes
1answer
30 views

How to manage multiple configuration for vim?

I am currently working with multiple projects which have different vim setting required. Is there a way to open vim with specific configuration file ?
2
votes
1answer
24 views

How to get back to normal mode when using vim keybindings in Firefox code/style editor?

I'm trying to use vim keybindings for the code/style editor in Firefox Developer Edition. I can type "i" to get into insert mode, but how can I get back to normal mode? The escape key toggles the ...
0
votes
1answer
20 views

How do I fold my .vimrc non-temporarily using vim code-folding? (sp13-vim)

I'm using spf13-vim, and I wanted to keep my vimrc folded into sections like this +------126 lines: Environment ...
0
votes
1answer
35 views

Unable to delete .swp file

I'm using Vim on Windows 7 Enterprise. Vim sometimes creates an .swp file. After closing Vim, this file sticks around. I would like to delete it. However, I receive the following error: ri : Cannot ...
0
votes
1answer
32 views

Can vim highlight current matching words when I input replace command?

Can vim(or by some plugin) highlight current matching words when I input replace command? For example, given following document: attribute_list = [ ("attribute_1", int), ("attribute_2", ...
0
votes
1answer
43 views

How to preserve tabs in Vim when you paste something? [duplicate]

When I paste any code into Vim, I the following happens. How could I tell Vim not to screw up my tabs?
0
votes
1answer
34 views

Why is vim inserting the contents of ". after I leave insert mode

vim is doing something that I can't quite figure out. When I leave insert mode, and navigate with j/k/h/l within a second of doing so, vim appends the contents of the ". buffer. On a tip from How to ...
0
votes
1answer
21 views

“Git commit” takes a very long time (> 40 seconds) to open vim. What could be happening?

When I run git commit -m 'some commit message', everything works as expected. When I run vim on its own, everything works as expected. Yet when I run git commit, which launches vim, it takes up to 40 ...