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
1answer
18 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
0answers
18 views

VIM like modes inside browser text field [on hold]

Looking for a browser plugin that will add vim like editing to text boxes like the one I'm currently typing to you in. Safari, Firefox or chrome are all options for me. Thanks!
0
votes
1answer
8 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
18 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
21 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
24 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
16 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
29 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
28 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
39 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
30 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
20 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
30 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
29 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
33 views

How to map ctrlp clear cache and refresh NERDTree root node?

How do I map <leader>r which clears CtrlP's cache and refreshes NERDTree's root directory? Psuedo code, I have: map <Leader>r :CtrlPClearCache<cr>g:NERDTreeMapRefreshRoot<cr> ...
10
votes
3answers
613 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
38 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
21 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
64 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
23 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
16 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
12 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
34 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
23 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
31 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> ...
0
votes
0answers
33 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 ...
1
vote
0answers
44 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 ...
0
votes
0answers
24 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, ...
3
votes
2answers
84 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
2answers
35 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
40 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
1answer
37 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
70 views

Can I insert .jpeg 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, ...
0
votes
0answers
32 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.
0
votes
1answer
44 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 ...
3
votes
0answers
37 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 ...
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. ...
0
votes
3answers
39 views

How to concatenate pairs of cells; every second cell to the first

How to concatenate successive pairs of cells in a column, adding the second cell of each pair to the first. For example: santhosh kumar sagar sv sai deva And the result should be: santhoshkumar ...
1
vote
0answers
29 views

Tmux 1.9a - variable #{pane_current_command} doesn't work as expected

I'm trying to get vim-tmux-navigator to work on my my Cygwin (Win7 x64) + Tmux 1.9a but it doesn't. The reason is the variable #{pane_current_command} always returns bash instead of vim, so the ...
0
votes
0answers
19 views

Mouse works erratically/intermittently over remote SSH

I work remotely sometimes. I’ll use Vim inside a Screen session, over SSH. I use the mouse in Vim. Sometimes the mouse breaks. One of these things happens: Random characters get inserted into my ...
1
vote
0answers
31 views

vim leaves a swapfile after crash with unknown owner

I am running Cygwin on windows. Several times now I've had a swap file left behind from vim after a crash, but it can't be recovered or deleted. "ls -l" shows this: -rw-r----- 1 Unknown+User ...
2
votes
0answers
68 views

Mouse click only works once with iterm2/tmux/mosh

I'm trying to set up iTerm2 + mosh + tmux to do my remote work. I can get everything to connect up, but for some reason, the mouse response is funky. If I split my tmux window so I have two panes and ...
1
vote
2answers
33 views

how to set .vim color scheme to vim editor OS X

I downloaded some .vim color scheme files in github and moved them by sudo mv ~.vim /usr/share/vim/vim73/colors then I wrote colorscheme ~.vim in vimrc. The original schemes already existed, are ...
1
vote
2answers
34 views

Make :Wq equivalent to :wq in vim

I'm always typing :Wq when I mean :wq. Is there a way to alias :Wq=':wq' in vim?
0
votes
3answers
57 views

Installing a vim color scheme

After some research, I've discovered that in order to properly install you need to create a .vim directory inside of the path represented by the $VIMRUNTIME variable from this StackOverflow post. When ...
0
votes
0answers
36 views

gnu screen not to change my window titles

I set meaningful names to new windows I create in gnu screen, but then when I 'cd' or open vim that name gets changed to 'pwd' for instance. Is there a way to prevent screen from changing the title? I ...
0
votes
0answers
25 views

Jedi vim autocomplete fails

After installing jedi-vim with Pathogen, I noticed that several features weren't working correctly. To test the behavior of jedi-vim, I copied the 2nd code snippet featured in the demo at the demo for ...