How do I operate on highlighted text in VI/VIM?
I want to know how to do some operations on highlighted lines (with v operator) like providing tab to selected line, comment those line, etc. using vi/vim. ...
I want to know how to do some operations on highlighted lines (with v operator) like providing tab to selected line, comment those line, etc. using vi/vim. ...
This is driving me batty. Using Vim 7.2.182 on Gentoo. In insert mode, my comma key does nothing. There's nothing in .vimrc that includes the comma key. :map shows no mapping that includes a comma. It's not a keyboard or similar issue: the comma key works fine in all other applications and in Vim in command mode, etc. But when I go...
vim's :vsp command opens a window on right. Is there a way to open it on the left side of the screen? ...
As title, any convenient way? I especially need it for some cvs/git commit or sendmail to load a template comment. I think it is a vi environment, not vim. ...
Nowa days I'm working with the Vi editor with the positive approach that you can do most things using it - unlike other editors. I came across one problem: Let's assume I have open a folder with vi <folder name> so it opens the folder in Vi and lists the files in that folder. I select a file and read the content, then I want to go ba...
Possible Duplicate: How can I configure Vim to compile C code using Borlands compiler on Windows? I have been trying to compile a simply c code using Gvim 7.2. I have the Borland bcc32 compiler installed, but I keep getting the message "make is not recognized as an internal or external command". What am I doing wrong? What shou...
I want to find a line that has both 'foo' and 'bar' in this order but not necessarily next to each other. I tried the following and it didn't work: /foo.*bar ...
I have a set of 4 massive CSV files that I need to modify. What I need to do is match this expression /^(.*),,/ copy the atom then prepend it to every subsequent line until the atom is matched again. Then I need to rinse and repeat until the end of the file (each file has approx 25k lines in it). Finally I need to go back through and r...
Say I have 10 lines and I want to prepend text to some word that occurs in those lines? It does not have to be at the beginning of the line. sdfsd foo sdfsd sfsd foo fsdf sdfsdf foo sdfsdf to sdfsd bar(foo sdfsd sfsd bar(foo fsdf sdfsdf bar(foo sdfsdf Is it also possible to not only prepend the "bar(" but actually su...
I'm using :set fileencoding=utf-8 and the file is saved correctly, but the next time I open it, I get garbled characters and :set fileencoding? says the option isn't set. From the docs I understand that I shouldn't touch the encoding option. What's the correct way of specifying an encoding for a file in VIM? ...
I always use vim+cscope to check sysmbol definition, and I find cscope always take declaration like: struct sk_buff; as a defintiion, which make vim always show a long list files to choose, always drive me crazy. Indeed, I only want the definition: struct sk_buff { ... }; Seems ctags can resolve this problem, but can cscope handl...
Using VIM, it is easy to display line numbers for any given file with: :set number However, the line numbering is 1-indexed, this means that the numbering starts at 1. Normally this is exactly what i want, however a particular tool I am using to compile my code reports zero-indexed line numbers - that is, line numbers start at zero. ...
You can keep the cursor line in the middle of the screen and then have the text scroll underneath it by setting the scrolloff to a very large number. Ex: :let &scrolloff = 999 To read more about how this works: :help scrolloff I love this feature and use it all the time but I would like the ability to keep the cursor at other locat...
When I start GVim and start writing my little program I'd like to save the file to the Desktop but it seems that Vim is starting the command line in: C:\Windows\System32 How would I go about changing that to: C:\Users\Casey so then I could just: :w Desktop\my_program.py Thank you :) ...
I'm using VIM do alot of work for me using the macros. There's alot of text in columns and I want the macro to move between columns effortlessly by pressing the w key to "move to the beginning of the next word" For example: DataSourceName string "" DetailFields []string ...
Using the FuzzyFinder plugin in Vim, how does one regenerate the file list displayed? ...
Possible Duplicate: Favorite (G)Vim plugins/scripts? I mostly do front end development and I'm wondering what sort of plugins others have grown accustomed do, that has helped them in their career. I'd greatly appreciate ones related to editing say xml/html markup, plugin to jump back and forth between start/end tags, maybe autom...
My syntax -highlighting is broken for a file which Type is conf as follows: File where the syntax highlighting does not work The syntax highlighting works for all other files with the extension .markdown. However, the only difference between these files is that the other files' type is nothing, while that of a file, which has bug, it...
Basically, I want to go from 1) to 2) I usually do this by splitting horizontally first and then vertically, but as I want this to do three-way diffs, it is much handier to start vim by running: $ vimdiff file1 file2 file3 And then doing something to open the split window below. 1) +----+----+----+ ¦ ¦ ¦ ¦ ¦ f1 ¦...
I wrote a simple hello world program to test the JDK installation. I can compile from Vim using: :!javac Desktop\HelloWorld.java That works just fine but when I try to run the program using: :!java Desktop\HelloWorld it gives me this error: C:\Windows\system32\cmd.exe /c java "Desktop\HelloWorld" Exception in thread "main" java....