This question already has an answer here: Start a git commit message with a hashmark (#) 8 answers i want add a git commit by use vim, like the picture. second line, I want add a commit text "#2355 fix a bug of this issues", but the vim think th
I've just begun learning Go, and upon running go fmt, I am finding tab ^I characters appear in my code: package main import "fmt" func main() { ^Ifmt.Println("Hello world!") } Is there a way I can configure Vim to not display these cha
Is there any command in vim that can split the arguments of this function and put them in a list: qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); to get ["void *base", "size_t nmemb", "size
My Ruby folding expression is causing auto-completion (<C-n>/<C-p>) to slow down dramatically, which is a massive pain. When I switch to manual folding, auto-completion becomes instant. To work around that I'd like the folding to be "on d
I have just started learning VIM using gvim. When I am in the insert mode, and after I have copied stuff ,I usually use CTRL+R + Shift * key combination to paste the stuff in. I would like to map those keys to CTRL+V . Can you please let me know what
I would like tabs in Vim (not the gVim) look as follows: Explanation: Sequence number of tab (1, 2, 3, 4 etc) Name of file (no path, no shortened path) If there are more than one file opened, list them in a tab. If there are duplicate tabs (hence the
This question already has an answer here: What's a quick way to comment/uncomment lines in Vim? 43 answers I'm new(bie) in vim. I've got the following mapping to comment my python code : nmap cc 0i#<ESC> I would like to have the same mapping to unco
How can i write a hook function that will place the cursor at the end of the file on opening a file. In elisp, it looks approximately like this, (add-hook 'open-buffer-hook (lambda () (end-of-buffer))) In vim, I can open a file and press :$ to go to
How do I install GVIM for Windows with Python3 support? I have installed VIM 7.4 which says in it's version file (run :version command) "+python3/dyn" and "-DDYNAMIC_PYTHON3_DLL=\"python32.dll\". So it looks like it's ready to sup
Is there any way to set vimdiff's diff strategy to be the patience algorithm? It's built into git and seems to be much better than a normal diff. For reference: How to set patience as default git diff algorithm Where can I find the patience diff impl
I've been using some mappings in Vim to avoid having to switch keyboard layouts to type in diacritics in my language (Croatian). However, now I wanted to move these mappings "up" so that they're available globally. I tried using AutoHotkey for t
I often try to edit a file with Vim that is already open in another Vim instance. In this case, you get the error dialog "Swap file "..." already exists!" with options Open Read-Only, Edit anyway, Recover, Quit, and Abort. In almost al
I'm developing ruby application in vim. When I run rspec from vim (using :!rspec), I got this strange error. Can anyone point me to the right direction and find out what the problem is? And why its fine if I use spec outside of vim? rspec spec/telepr
I was using vim and python perfectly fine till I upgrade to Maverick. Now I have a similar issue as here. When I remove remove canopy path from bash_profile and use default python path , vim works fine, otherwise I am getting the above error. You can
In order to edit fast in insert mode, we can use mapping keys to navigate in insert mode, for example :inoremap <A-h> <Left> with this mapping, user can press Alt + h in insert mode to let the cursor move left and then do insert, we don't need
I have an XML file that I want to make some changes to. For example I want to open the file in Vim and run a find and replace all instances of memory="..." attribute to memory="24G" but only if the element is from name="node-0...&
I have installed mintty. After that I am not able to open gvim. As suggested in same question for emacs I use: 1) mintty gvim this opens a new window with message : E233: cannot open displayE852: The child process failed to start the GUI Press ENTER
Actually I want to autosave my current file, :w command writes the file so I thought that when I will repeat this command at regular interval (say each 30secs.) I will achieve what I want. But how can I do so?Take a look into :help autosave
I would like to put something into my vimrc so that if I open 2 files they automatically open in separate split windows. I don't want to start it with -o because I sometimes open a lot of files at once and having 15+ splits would not work very good.
In vim, in normal mode, if the cursor is in a word, not the last letter, de deletes the suffix of the word, from the position of the cursor. If the cursor is on the last letter, x does it too, while de would jump to the end of the next word. What com
I have two opened buffers (i.e. A and B) and one window. Currently I see A, I would like to open B in vertical window. To do it in horizontal window I can hit Ctrl+w ^, how to do it in vertical window? And how to change horizontal windows to vertical
Just noted I can't move cursor to left or right (up and down works correctly) in Insert mode while editing an .sql file, with other files it works ok also. Any hint?. Vim: 7.2.330 - Ubuntu 10.04 x86_64Install "vim". It lets you to traverse text
In the dictionary file, which I am editing I often need to insert character "◊" on place of <>. Is there a way to map "◊" to some key so that I press "r" for replace and then my_shortcut to have <> replaced by &qu
I'd like to know if there is a way to figure out if a key does something in vim. I know that I can use :map to see user-defined mappings, but is there something for the built-in stuff? For example, I always had CTRL-W bound to close tab, because I th
I'm a recent vim convert (from fancy IDEs like eclipse.) I love the :make command in vim and use it extensively; however I also like to edit multiple projects (with separate makefiles.) So usually to edit more than one project I will do pushd project
I have a small problem with "tab size" and different project, some like 2 or 4 and the Linux kernel like 8 spaces per tab. And this is not a big problem since I can just change a couple of settings in my .vimrc set tabstop=4 set shiftwidth=4 set
In Vim, is there a way to quickly toggle between the current tab and the last active tab? Sort of the way '' toggles between the current line and the last active line. Plugins / keyboard mappings / voodoo all acceptable.Put this in your .vimrc: let g
Assuming the following text file, which is actually a data dump of funds and price statistics: PBCPDF 05/01/2006 0.0000 0.0000 PBCPDF 0.0000 06/01/2006 0.0000 0.0000 PBCPDF 0.0082 [- lines repeat -] What I wanted to achieve is to delete all instances
I am using the vim editor and I wanted to empty out all methods in the class, for instance class A { public: int getNumber() const { return number; } void setNumber(int num) { number = num; } }; I wanted to have a regex where I could substitute so th
This question follows on from this vim search question I have a setting in my .vimrc which excludes $ as a valid part of a word: set iskeyword-=$ This works fine for most files but isn't working in PHP. I assume it is being overwritten by a php plugi