vim (Vi IMproved) is a text editor supporting different editing modes.

learn more… | top users | synonyms

2
votes
1answer
94 views

What is this VIM plugin?

It's a modified vim bar that includes current path and current git branch. I've been looking around but couldn't find anything. Found in: https://github.com/w0ng/vim-hybrid
5
votes
2answers
180 views

Can I get vim-stlye (hjkl) navigation for GNU info?

The layout of my netbook's keyboard means that using the arrow keys for navigation is slightly uncomfortable. Is there a way to make GNU Info pages use vim-style hjkl navigation? I know I can info ...
0
votes
1answer
113 views

Vimrc autosourcing not working

My vim configuration lives in $HOME/.vim/vimrc, which is symlinked to ~/.vimrc. Inside my vimrc I have: if has("autocmd") autocmd bufwritepost vimrc source $HOME/.vim/vimrc endif But is not ...
2
votes
4answers
101 views

how to invoke vim with line numbers shown

I know that from inside vim the command to display line numbers is :set number. Is it possible to invoke vim so that line numbers are shown from the beginning?
1
vote
2answers
303 views

How to fix weird vim polluting the terminal behaviour on arrow keys and on delete in insert mode?

My terminal gets polluted by B, C,A,D when I try to navigate within vim using arrow keys and on delete using backspace it only scrolls back without deleting the characters on screen while the ...
1
vote
1answer
225 views

urxvt map esc key to key sequence

This question is a spin-off of Rebinding "clear prompt" in mutt I use vim keybindings a lot and like using esc to abort commands. I've now moved to mutt but it is not possible to bind esc ...
0
votes
0answers
78 views

Installing cppman

I've tried to install cppman in Fedora 19 or Linux mint 15 and it installs successfully. But when I try to use it I get the error: Python IOError: [Errno 13] Permission denied I've installed it in ...
0
votes
1answer
391 views

Tmux ranger integration: opening text files in new panes

Here we have some amazing tools: tmux, ranger, vim... Would be amazing to configure ranger to open the files (when text editable) in a tmux newpane? Is that easy and how it is done?
2
votes
2answers
208 views

Is it possible to copy data from one screen session to another?

I recently needed to copy X amount of lines from a file, that I opened in vim and then paste them to another file opened in a different screen session (and different server). So on screen #1 I ran in ...
7
votes
4answers
1k views

How do I make Vim behave like “tail -f”?

I would like to know if there is a way to make Vim behave like tail -f. Even the best Vim plugin I've found so far doesn't do what I expect. I really want to see the file update in real-time. Even ...
2
votes
1answer
218 views

vim and tmux are conflicting. How can I fix this? [duplicate]

I'm having a painful experience with tmux. I'm using solarized in vim but when I run tmux then my vim configuration does not work. It's as if solarized is not configured in my .vimrc. Out of tmux ...
3
votes
2answers
243 views

How can I use aliases in commands?

I have created aliases in my .bashrc for various frequently used long paths but I can not seem to be able to use them inside vim or with commands such as find or grep. E.g the following: db in cli ...
-1
votes
1answer
110 views

How to use colors/colorschemes/fonts in vim effectively so that the text is as readable as possible

I am trying to be more productive in vim and as part of this I am trying to make the text presentation i.e. colors etc as nice to the eyesight as possible. Although I managed to change the default ...
2
votes
1answer
216 views

How can I see moved lines in a file comparison with vimdiff / diff?

Moved lines are frequently annotated as deletes and adds but they can be shown as moved-from and moved-to instead. Like in this screenshot of Notepad++.
3
votes
2answers
145 views

Is there a way to configure vim to run external commands through cpanel jailshell?

I'm editing files in vim over ssh, and I'd like to save git commits and things by running external commands in vim, like :!git add % && git commit -m "update" but because my server (hostgator) ...
0
votes
3answers
230 views

Make VIM act as Notepad++ on mixed line endings

I've googled all around and found tons of weird solutions to ^M problem, but couldn't find one and simple: how could I just open any file, like in Notepad++ and work on it? I don't want to mess with ...
4
votes
1answer
124 views

Customised vimrc for subfolders and projects

I use vim in many different contexts ... actually, probably most people do: There is the editing of configuration files, programming, documenting, email and so forth. I very frequently found myself ...
1
vote
1answer
307 views

Vim Visual Mode - is there a way to change the background color only when in visual mode?

I forgot which mode I am in using VIM so I set this up in my .vimrc so that I easily know I am in Insert mode as the background changes to Yellow :au InsertEnter * hi Normal term=reverse ...
0
votes
1answer
61 views

cw and . does not work as expected in vim on character deletion

If I have the following non-sense text: Hi woman! What is your name? I know what you mean... Yeap. Yeap. Again :) Hi woman! What i s your name? I know what you mean... Yeap. Yeap. Again ...
3
votes
3answers
922 views

Running external commands in vim

It seems that if I run the following inside the vim: :w !wc -w I get the word count of the file. But I don't understand the syntax. How does this work and how would I specify that I want the ...
1
vote
2answers
554 views

Can not edit .vimrc file

I have just installed spf13 plugin for vim and I want to customize .vimrc file. When ever I try to save the edits it says: ".vimrc" E166: Can't open linked file for writing syntastic: info: no ...
3
votes
1answer
440 views

Vim powerline with broken encoding

I trying to learn using vim, I am enjoining a lot, but I copied the vimrc from github and I would like to understand what is causing the break of powerline encoding. . In the vimrc file I have: set ...
2
votes
1answer
132 views

How to right or left shift a block of text by a specific number of columns?

If I use vim, put the cursor on the beginning of a line, and then input 3>> or 3<< I can left or right shift 3 lines by 8 columns If I just want to shift 4 columns, what should I ...
2
votes
1answer
105 views

Vim command mapping help

I'm a relatively recent convert to Vim, so I don't know a whole lot. My question is about mapping a multi-part command to a single key combo. In my .vimrc, I've got the following line: nnoremap ...
1
vote
1answer
83 views

incorrect/overwritten margins when using vim in GNU screen

When ssh'd into a work server via PuTTY I'm seeing strange behavior with the left margins when using GNU screen and vim. For example, I'll open up a Python script and all indentations will be gone ...
0
votes
2answers
59 views

Vim autocommand creates weird file

I've just set up slackware 14 on a virtualbox. As one does, I immediatly created/altered my .bashrc and, more importantly, my .vimrc files. To avoid writing huge lines of code, I usually add ...
2
votes
2answers
138 views

Any unix utility/tool to auto backup files before saving?

I would like to know if there is any existing unix utility or tool that would make a backup of a file with a date/timestamp appended to the filename. Basically I am looking to automatically make ...
0
votes
1answer
295 views

How to change search result highlight in vi?

The scenario: I log on a server using ssh, and search for keywords in a log file using vi. The problem: at the moment, the results of a search is only highlighted by a cursor _ below the searched ...
0
votes
1answer
224 views

VIM(Mercurial) +python3.2 on debian wheezy: Could not load library function PySys_SetArgv

> ./configure --enable-python3interp=dynamic --enable-gui=gtk2 > --with-python3-config-dir=/usr/lib/python3.2/ make vim --version|grep pyth +cryptv +linebreak -python ...
1
vote
0answers
112 views

Modify .inputrc to fix Mac Terminal bug with vi mode

I currently have a bug in my Mac's Terminal (I actually use iTerm2 but it's still there), where once I press left arrow after typing, I can't go past the last character. Is there a way I can modify ...
3
votes
2answers
87 views

Vim global search in a project

I started using vim two weeks ago switching from sublime and I am a ruby developer I know for a fact that Ack and Ag work very good on a Mac while they're not optimized for my Ubuntu machine. These ...
1
vote
2answers
50 views

Adding commands to VIM?

I keep accidentally entering W instead of w as the command to save my changes. Is it possible to create a shortcut, alias, or command to write, and give it the hotkey of W?
4
votes
3answers
654 views

`grep -l .. | xargs vim` generates a warning, why?

If I run a command like grep -rl test . | xargs vim I get a warning "Vim: Warning: Input is not from a terminal." But I am still able to edit the files. Why the warning?
5
votes
1answer
363 views

What is the point of Virtual replace mode in Vim?

The help says that virtual replace mode commands in Vim gr & GR replace characters in screen estate and not in file. :help Virtual-Replace-mode I am understanding this as something like ...
3
votes
1answer
70 views

Vim settings within ncftp edit

I'm using the ncftp utility. It has an edit command which handles the get, edit, put sequence for me as in GUI ftp clients. It's great except for one thing, I get vanilla vim, with none of my ...
2
votes
1answer
105 views

SED Showing CRLF While Vim Not Showing

Why sed l\;q shows a CRLF while opening the file in Vim with :set list doesn't show any CRLF
0
votes
3answers
292 views

Text editor with indented word wrapping

I've been using Notepad++ in windows for a while and it has a cool feature for word wrapping so that the wrapped text is indented. That is the start of the sentence starts at column 1, but wrapped ...
5
votes
3answers
2k views

vi / vim - how to automatically strip trailing spaces on save?

Is there a .vimrc setting to automatically remove trailing whitespace when saving a file? Ideally (to be safe) I would like to only have this functionality for certain files, e.g. *.rb
0
votes
1answer
96 views

vi / vim - extra indents when pasting text? [duplicate]

I can copy characters in other apps such as browsers with ctrlc. I can then press i to enter insert mode in vim and press shiftctrlv to paste the text in. The problem is that each line gets indented ...
4
votes
1answer
107 views

Vim syntax highlight length-delimited fields

I'm trying to write a vim syntax file for SVN dump files. The part I can't figure out is the section like this: Fooprop: Val1 Text-content-length: 20 Barprop: Val2 ...
-1
votes
1answer
386 views

Can't uninstall vim [closed]

I've got a problem with vim deinstallation. I've done sudo apt-get remove on vim, vim-common, vim-tiny and actually anything starting with 'vim' in the package list, but still can run vim from command ...
4
votes
1answer
119 views

Can I access X11's clipboard from tty1-6?

Sometimes, when I'm running on battery and don't need a window manager, I'll log into tty1, fire up fbterm and Vim and work. Later, if I need the window manager, I'll use the log in GUI but switch ...
3
votes
1answer
56 views

Expanding functionality of case switching commands in Vim

In my current work of refactoring a fairly large codebase, I find myself wanting to replace apostrophes and quotes with each other from time to time. Up until now I've been applying s/"/'/g for ...
3
votes
1answer
93 views

How do I save all vim buffers on tmux window change?

Is it possible to hook up vim save all command on tmux window change? I know that gui vim has option to save on focus lost. I'd like to have similar behavior in console.
2
votes
1answer
114 views

File no longer available when trying to edit in vim via <()

When working with mercurial, I frequently do things like vim <(hg cat -r 42 somefile) However, if I try this with a file larger than several hundred lines, I get a Read Error in vim, and only ...
1
vote
2answers
213 views

Why does Vim only activate my highlight configuration after I source my .vimrc manually?

I was cleaning up my vimrc today, splitting it into separate files to make it easier to maintain. On completion of these changes, all my configuration, mappings and plugins appear to be working, ...
1
vote
1answer
86 views

Set auto completion for a new filetype

I have a file, which contains lines of function name, now I want to use them for code auto completion, and only for file names end with .XXX. How should I do it, is it possible to work with ctags or ...
4
votes
2answers
370 views

vim shortcut to open a file under cursor in an already opened window

In vim you can open a file under the cursor by using the gf command. One can also easily open that file in a new split window by hitting <c-w> f. This is a really nice and time saving feature. ...
3
votes
2answers
172 views

Vim - loop through files in cope

how can I lop through buffers in quickfix list :copen and make some actions with it. Or any alternative way to put those files to args list and I can use argsdo.
4
votes
4answers
261 views

Vim: copy, then paste more than once

I use the highlight mode in vim to copy a few characters. I then want to paste more than once. My current technique does not work well. Sample text: Linux Solaris Irix HP-UX Suppose I want to copy ...