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
1answer
36 views

Using vim for creating fixed width text?

I've got text in the form xxxx yyyyy xx yyyy xxxxxxxx yyyyy x y I'd like the second set in each line to begin at the same point ie xxxx yyyyy xx yyyy xxxxxxxx yyyyy x y I ...
1
vote
1answer
40 views

Yanking multiple inner words in vim

The inner and outer word text objects in vim behave differently when combined with a count. Given the text (cursor is within the word first) first second third fourth both y2iw will put the first ...
0
votes
2answers
29 views

:!ls in vim closes the current file rather than open a window at the bottom

When I use :!ls in Vim command line, it supposed to open a window at the bottom with Press ENTER or type command to continue. But my vim closes the current file. How can I fix it?
2
votes
1answer
358 views

Mouse scrolling in vim through tmux, how to configure?

I'm using a combination of PuTTY, tmux and vim. If I just open an SSH connection with PuTTY and then open vim, mouse scrolling works as expected. But if I open tmux and then open vim inside tmux the ...
0
votes
3answers
71 views

Moving to the beginning of line within Vim insert mode

While typing I realize that I need to move to the beginning of the line. Usually I use <Esc> and I. But I am wondering if there is another way to move to the beginning of the line in the insert ...
1
vote
4answers
47 views

Open multiple additional tabs at once within Vi

I often switch back and forth between multiple files at once in vi and am always adding more with tabe. Is there a way to add more than one tab at the same time while keeping all my open tabs? I've ...
0
votes
1answer
62 views

linux bash settings for vim

When I close vim in linux shell bash, part of it viewing is still seen, usually root, but in some other users, usually other than root, vim closed means no viewing document is seen. Where/how can I ...
0
votes
2answers
174 views

Remove vertical bar of vim's vsplit, vacating the space instead of hiding it

For the last decade I usually work in a full-screen mode terminal emulator (often xterm), and often with :vsplit in vim. 1280×720 offers 160 columns for typical 16px font (8px wide), just enough for ...
1
vote
3answers
396 views

Delete last word (Ctrl-W): Make bash shell behave like vim command line

Among the many useful keyboard shortcuts available in the bash shell, there is Ctrl-W to delete the word to the left of the cursor. Let's suppose my command line looks like the following: cp ...
1
vote
1answer
153 views

gvim latex interface not appearing after latex-suite installation

I have been installing gvim with the latex-suite plugin on a laptop running an Ubuntu 13.10 OS. The installation of gvim worked, but I'm not sure if the latex-suite installation did too. According to ...
0
votes
1answer
106 views

Is it safe to map a key to a custom escape sequence in iTerm?

There are some keys I use in MacVim that terminal Vim doesn't recognize. For example, Ctrl-Enter, Shift-Enter, Ctrl-Space, Shift-Space, Ctrl-Backspace. I'm using iTerm2, which lets you map keyboard ...
0
votes
1answer
186 views

How to find special characters in Linux Vim

I want to find special characters in a text file. It is known that the UTF-8 encoded file contains Chinese characters , "-", "^A"(control-A, which is one of special characters), numbers, ...
1
vote
1answer
30 views

R and gR difference in Vim

When I use R and gR in vim where there are tabs, I don't notice the difference. According to Practical Vim, Virtual Replace mode is triggered with gR and treats the tab character as though it ...
1
vote
1answer
46 views

Searching all versions of a file in the undo tree in VIM

Is there an easier way to find a particular change in Vim's undo tree than just looking at random old versions of the file one at a time (either using vanilla VIM commands, Gundo, or another plugin)? ...
2
votes
1answer
362 views

bash vi mode: What does # -*- mode: ruby -*- # vi: set ft=ruby : mean?

I'm looking through some random code, and at the top of it, it says this: # -*- mode: ruby -*- # vi: set ft=ruby : What does this mean? I know it's a simple question, but I couldn't find it out ...
2
votes
1answer
50 views

Map vim commands to compile-time features

Vim has the notion of features, i.e. subsets of functionalities that may or may not be supported in an actual installation, based on compile-time flags. Presence of a feature can be checked with the ...
3
votes
1answer
454 views

vim inside tmux: throws “E388” with <C-Left> in insert mode [duplicate]

I've read that in insert mode in vim, one can use <C-Left> and <C-Right> to move by words. This works for me, but only as far as I don't run vim inside tmux terminal splitter. When inside ...
1
vote
1answer
62 views

Vim: What is the difference between these two methods of setting a variable?

In my .vimrc, I have the following variable defined: let $VIMFILES = "~/.vim" Further in my .vimrc, I attempt to set the backupdir option like so: set backupdir=$VIMFILES/backup " `set backupdir?` ...
2
votes
3answers
71 views

Linux - Open nth File LIsted

I'm Ubuntu, I do ls and get a list of files. How would I open the nth file in the list in VIM in reference to its position from the ls command, and not its name? I want to do this cause a directory ...
2
votes
1answer
73 views

One file, syntax highlight for multiple filetypes

When taking notes during lectures, I find myself frequently wanting to highlight a segment of a file, say a 5-line code snippet with syntax for it's respective language, while leaving the syntax ...
6
votes
4answers
800 views

No syntax highlight on .md files?

Vim properly highlights .markdown files, but it seems unfamiliar with .md filetypes. A comment on at the question http://stackoverflow.com/questions/10964681 seems to imply that .md is the wrong file ...
0
votes
1answer
67 views

Downloading correct vim packages

I need help reconfiguring my vim!! In the process of working with it, I decided to download the .vim files and reinstall. After reinstalling I have had some major problems with my vimruntime. My vim ...
0
votes
2answers
58 views

Replace whole line in vim

So I have the following text snippet in my file. I am using vim to edit it. Internal Problem Description ---------------------------- !!! Please enter the internal description of the problem. So to ...
0
votes
2answers
48 views

How to copy html content with original formatting to vim editor

Trying to copy/paste html from this source - second live demo example. When I copy the code, output is wrong formatted and it looks like the following in vim editor: What is the best way to copy ...
2
votes
3answers
103 views

Vim: Do you really use the registers? [closed]

To me, the cognitive process of having to explicitly store and retrieve values from the named registers in Vim still feels like a burden after 3 years and a couple of Vim books. I know it has ...
0
votes
0answers
432 views

Compiling Vim 7.4 with GUI support on Fedora 20

I've installed the following dependencies before trying to compile Vim 7.4 from source on Fedora 20 (Default Gnome). I've removed the vim-enhanced package via yum before proceeding: yum install ...
0
votes
1answer
76 views

VIM - How to change color of if, else, endif, for and endfor statements

I just Django html so I have the normal html tags as well as the if, else, endif, for and endfor statements. I use a customized version of the colorscheme called slate. There is a line in the ...
0
votes
1answer
19 views

VIM - in colorscheme file, how to have different colours depending on what the syntax is?

I use VIM and I want I use my own customized slate colorscheme (slate-mine.vim). In slate-mine.vim, is there a way for me to do something like if syntax == django html then apply the following ...
1
vote
1answer
202 views

VIM - how to open .html files with django html syntax rather than just html syntax?

I use Django a lot and I just want to open all .html files with the htmldjango syntax rather than html syntax. Is there a way for me to tell vim to open all html files with a htmldjango syntax? ...
1
vote
1answer
25 views

Editing the htmldjango.vim file

I like htmldjango.vim syntax highlighting except for a few things. 1) It highlights all variables (whatever starts with {{ or {% and ends with }} or %}) white and gives it a red font. I want all ...
0
votes
2answers
25 views

creating a basic html vim syntax file

I use vim and type a lot of Django html code and I don't like the htmldjango.vim or html.vim highlighting syntax. I decided I should just create my own basic syntax highlighting for Django html. All I ...
0
votes
1answer
26 views

VIM: Clear mapping, autocmd and other effects from deleted plugin

I recently removed python-mode plugin for some reason but its mappings and event calls are still intact for the buffers which I opened when the plugin was installed. Since no vim scripts from ...
2
votes
1answer
34 views

How do I tell if a Vim swap file is unmodified and unopen?

I frequently have dozens of files open in Vim when my machine crashes, and open them all at once through a session file. However, all the prompts about existing session files bug me. I always choose ...
2
votes
1answer
37 views

vim: how run external app on a file if filename in register or variable

If I issue the Ex command :!xv file.png all is well, and xv starts and displays the file. But if file.png is in a register or variable, which is necessary as I wish to do this in a script, ...
1
vote
1answer
292 views

Running vim script exits batch file? (Windows .BAT/.CMD)

Trying to run a vim script as part of a batch file with vim -u NONE -S dothis.vim but what is puzzling is that the batch file exits after this line instead of continuing with the next statement. ...
0
votes
2answers
42 views

How can I find a string using :argdo in vim?

I tried this: :argdo /pattern However, it just went through all the files very quickly, and did not pause at each location where the string was found. I just want to iterate over all the locations ...
2
votes
1answer
65 views

Are there any lite text editors in console mode on Windows? [closed]

I know a few: Renowned text editor: MS-DOS Editor Vim/Vi But, MS-DOS Editor is a 16-bit software which cannot be run in Win7 (64-bit), and Vim/Vi is not lite. Are there any lite text editors in ...
1
vote
2answers
85 views

Vifm in Windows 7 x64 filetype default for OS

I was looking around for a file manager that has Vim key bindings and worked with Windows and that resulted in me discovering about "Vifm" Problem is (besides the fact it can't be ...
4
votes
1answer
114 views

Making vim use the alternate screen

This thing is driving me crazy. I have already searched the internet and SE and found a lot of related questions but none solve my problem. I'm using Zsh inside tmux. Until a couple of days ago ...
0
votes
1answer
195 views

Cannot get konsole to show the right characters for fancy powerline

I'm using Kubuntu and the patched fonts for powerline are not working as expected... The screenshot is from terminal Vim, but gVim has the same problem in my machine. Does anyone have any ...
9
votes
1answer
2k views

Can't run Vimdiff (7.4) on Windows 7

I recently installed the 7.4 version of gVim on a Win 7 machine. Trying to diff two files from the context-sensitive menu on Windows Explorer, I keep getting the error messages: E810: Cannot read or ...
0
votes
1answer
136 views

Vim not making font italic when it should?

I use gvim and use the colorscheme called slate. I modified it a bit and saved the changes in .vim/colors/slate-mine.vim and all the changes take effect except for one. I wanted to make all comments ...
1
vote
1answer
78 views

vim - how to treat three quotations in a row as a comment rather than a string

I use python and in python, three quotation marks in a row """ or ''' signify a block-comment, and a normal comment is just a hashtag. (#) I want comments to be colored grey and strings to be ...
0
votes
1answer
61 views

how to search for vim files in lubuntu?

I want to change one of gvim's existing colorscheme's syntax coloring. For example, in the colorscheme called 'Ron', it highlights python comments in white. I want to change it to red. According to ...
0
votes
1answer
27 views

Get last mapped key used in vim

Is there any way to find the last key used in vim so I could use the same function for multiple things depending on the key pressed. For instance: nn <F1> :call Fhandler() nn <F2> :call ...
0
votes
1answer
130 views

How can I trigger a Vim autocmd when entering a Netrw window?

I'm trying to write a pair of Vim autocmd's to toggle an option on/off upon entering/leaving a Netrw browser window (via :Explore, :Vexplore, etc.). I opened one such window and ran :echo ...
0
votes
1answer
30 views

vim uses the same ftplugin for all file types once it has been loaded

My problem with vim 7 is that it uses the keybindings of the filetype plugin tex.vim once it has been loaded, and uses it for all file types! I think this should not be intended behaviour. Maybe I am ...
0
votes
2answers
70 views

How to select multiple non-sequential lines in Vim

Is there any way to select multiple lines in Vim? For example I want to select line number 1,4,7,8 etc? I know that I can use V or v to select lines but they select the continuous lines. For ...
0
votes
3answers
163 views

How to use my Eclipse CDT syntax coloring setup as my gVim color schemes?

As Eclipse cannot show two pans of code simultaneously, I am used to using gvim to have it. But the color scheme / syntax coloring is different, what makes code review and comparisons hard. Is there ...
2
votes
1answer
79 views

Vim: use NERDTree cursorline without affecting cursorline in other windows?

I'd like to make my NERD_Tree windows easier to read, and the 'NERDTreeHighlightCursorline' option makes it easy to do so. Except I currently have a setup I like that allows me to highlight the ...