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

0
votes
0answers
9 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
21 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
32 views

Best way to increment numbers in one line in Linux

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
14 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
0answers
19 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
25 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
5 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
19 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
11 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
26 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
18 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
32 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
41 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
28 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
22 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
21 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
31 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
30 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
16 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
14 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
16 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
27 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
17 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 ...
2
votes
1answer
33 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
22 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
19 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
32 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
29 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
42 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
33 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 ...
0
votes
0answers
35 views

Vim boilerplate (automatic, file specific) [duplicate]

There is a bit of code that I want to include in a variety of files done with vim, and I don't feel like copy-pasting every time. The example that I want to accomplish the most is vim newfile.tex ...
0
votes
0answers
32 views

How can I use VIM with remote files?

I've tried googling but all I find are terrible tutorials that end up not being compatible with VIM that are out dated or require me to manually upload every single time instead of letting me work on ...
0
votes
1answer
54 views

How to point MacVim to the right perl on OSX 10.10?

When I try to use MacVim from the command line, I get dyld: Library not loaded: /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/libperl.dylib Referenced from: ...
0
votes
1answer
55 views

How to map ctrl/p clear cache and refresh NERDTree root node?

How do I map <leader>r which clears CtrlP's cache and refreshes NERDTree's root directory? Pseudo code, I have: map <Leader>r :CtrlPClearCache<cr>g:NERDTreeMapRefreshRoot<cr> ...
10
votes
3answers
666 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
41 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
26 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
1answer
164 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 ...
1
vote
0answers
29 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
24 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
1answer
17 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 ...
2
votes
1answer
36 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 ...
1
vote
1answer
22 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, ...
0
votes
0answers
25 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 ...