2
votes
1answer
21 views

Reverse global and local marks in vi/vim

How can I reverse the capitalization convention of marks in vi/vim? Normally a lower-case mark like "a" means it is local to the current file, but upper case marks like "A" are global to the session. ...
6
votes
1answer
83 views

Can I specify the layout of a vsplit command?

When I do the :vsplit command, it always opens the new file on the left side of the screen. Is there a way I can specify I want the new file to open to the right?
17
votes
5answers
3k views

vim - better colors so comments aren't dark blue?

Mostly I edit ruby files, although shell script file comments are also # Currently my comments show as dark blue on black which is really hard to read. See screenshot. How can I change their color? ...
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
99 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
2answers
427 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. ...
9
votes
1answer
1k views

Vim: Making XML text “pretty”

Is there an easy way within vi to make your XML text "pretty"? For example: I want this.. <person> <name>Nick</name> <age>26</age> ...
2
votes
5answers
2k views

Comment all lines in a text file?

In a text file I need to comment out all lines by adding a ";" as first character of each line. What is a good way to do this? I thought of Vim's visual block mode, but I couldn't find a "select all" ...
4
votes
3answers
3k views

vi/vim, how can I write out a number of lines to a new file

I have a bunch of lines that I want to write out to a different file. How can I do that?
1
vote
4answers
474 views

Is learning a text editor like vi necessary and still worth the time today? [closed]

I started a new internship where all the servers run on AIX. Logging in for the first time I was suprised to see that my favorite text editor nano was not installed. Everyone here uses vi not ...
2
votes
1answer
208 views

Beep when typing backslash in cvim normal mode

I installed the cvim plugin for vim. Almost all the cvim commands start with '\'. But I when enter this character in normal mode, all I hear is a beep. Nothing happens. What might be causing this ...
2
votes
1answer
167 views

Expanding text format in VI

The following code is taken from the superfish module for websites: (function($){$.fn.hoverIntent=function(f,g){var ...