vim

What are the advantages of having customized commands with the <Leader> key on Vim?

I think its self explanatory. How it is more efficient to use that key? ...

Align text only on first separator in VIM

Suppose I have this code: width: 215px; height: 22px; margin-top: 3px; background-color: white; border: 1px solid #999999; I want to align it this way: width: 215px; height: 22px; margin-top: 3px; background-color: white; border: 1px solid #999999; using Align.vim I can do :Align \s to use white...

Using SHIFT+Arrows to select text in vim / MacVim

One of the nicer features in MacVim is that it is possible to use the usual OS commands for copying and pasting text (namely command+C and command+V) in it. This is especially nice in situations when you’ve worked in another editor just a minute before and your brain isn’t ready yet to advise your fingers on how to type the real thing. ...

Mercurial - How to set "hg diff" output shows in gvim?

I use mercurial and I want to see modified change in Vim or GVim. Normally there is hg diff which show the modified changes in diff format. but I want to see it in Vim as the original version and modified version side-by-side. I try extdiff in http://mercurial.selenic.com/wiki/ExtdiffExtension but it doesn't work and gvim open some blan...

how to jump back to the previous edit place

Is it possible to go back to the previous edit place in vim ? I know use mark one can move back and forth between different places within a file , but I don't know whether or not vim could automatically remeber the previous edit place for you . ...

Is there a way (or a plugin) to make Vim generate a code outline for CSS?

I was trying to install taglist (but I couldn't install ctags), but I realized that it doesn't support css, is there another way or plugin to perform this job? PS: I checked the install file of ctags, but I couldn't find any steps which looked like an installation manual. it just says: Installation Notes ================== For non-Un...

How to use GVIM to edit a remote file?

I use GVIM on Ubuntu 9.10. I'm looking for the right way to configure GVIM to be able to edit remote files (HTML, PHP, CSS) by for exemple ftp. When i use :e scp://username@remotehost/./path/to/file i get: error detected while processing BufEnter Auto commands for "*":E472: Command failed. When i open a file on remote via Dolphin or Na...

vim keyword complete when omni complete returns nothing?

Im trying to use omni completions and if it returns nothing i want to use normal keyword completion? i thougt %omnifunc != '' should do it... but what am i missing? Here is my function. function! CleverTab() if pumvisible() return "\<C-N>" endif if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$' return "\<Tab>" else...

How can I separate pages with Vim?

I have the requirement of separating an ASCII document into pages of max length 58 lines per page. At the bottom of each page there is a 3 line footer. I'm not aware of any pagination abilities within Vim that would accomplish this. Is there a good way to do this with Vim? Perhaps highlighting every 58th line or something of the sort. ...

Stopping VIM from opening all subsequent closed folds when creating a new one

I noticed that when I create a new fold (I'm using foldmethod=marker) all the folds below the one I'm creating are automatically opened, is there a way to prevent this and leave them closed? I can't use zf to manually create a fold because I'm editing PHP/HTML and there is no 'commentstring' format good for both. ...

Vim plugin help: Auto insert closing bracet with cursor in middle

I found some threads on this but they are 3 years old. Does anyone have a plugin to recommend for vim that when I type { it will do: { ::cursor here:: } another helpful thing is if I type if it will do: if(::cursor here::) Thanks ...

Is there any way to indent wordwrapping acording to syntax in Vim?

Possible Duplicate: Smart Wrap in Vim I want the wordwrapping to fit the 4 space tab width in my html file. I want the Maecenas nisl quam to follow the identation of the li tag Is that possible (other than do it manually)? ...

Code folding is not saved in my vimrc

I added the following code to my .vimrc: " save and restore folds when a file is closed and re-opened autocmd BufWinLeave *.* mkview autocmd BufWinEnter *.* silent loadview HTML and CSS documents save and restore their folds but code folding is not being saved in my .vimrc Any suggestions? EDIT: The following code solves the probl...

Why is so complicated to remap Esc to CAP LOCK in Vim?

I saw the vim wiki tips and it says that in order to remap Esc to CAP LOCK you have to edit the following windows code: REGEDIT4 [HKEY_CURRENT_USER\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00 Is it possible to remap Esc to CAP LOCK by only adding or modifying lines in the _vimrc? ...

ctags generator for CORBA IDL?

I work in a multi-language environment and use Vim + ctags for navigating the code. However we also use CORBA and exuberant ctags does not parse IDL files. Does anyone know of a ctags compatible tags generator for IDL? ...

What vim command(s) can be used to quote/unquote words?

How can I quickly quote/unquote words and change quoting (e.g. from ' to ") in vim ? I know about surround.vim plugin, but I would like to use just vim. ...

Problems installing and using filetype plugins in Vim

I downloaded xml.vim (xmledit : A filetype plugin to help edit XML, HTML, and SGML documents ). I placed it in my ftplugins folder. I read the documentation and it says: enter :filetype plugin on but this doesn't work, I'm still unable to make the filetype plugin work. Any suggestions? ...

Vim : Open multiples files on different lines

Hi all, I was wondering if there's a way to open multiples files with Vim, but each file on a specific line number. I explain : I often use the syntax : vim my/way/too/far/file +120 in order to edit this file at line 120 because gcc told me too :) Now what i'm looking for is a way to do this for multiples files at the same time! Of c...

What unix text editor should I learn?

Maybe this should be a community wiki page... What unix text editor should I learn? My co-workers mostly use vi. I am thinking about vim because the syntax highlighting seems appealing. Is there any advantage to vi over vim? I know that there are a lot of emacs fans out there too? Is there any reason to learn a specific editor? ...

Reasons for using command line Vim versus GUI Vim

Background I'm building an application where it detects what documents you're using from the file system. To do this it must access the AXDocument attribute of the active window. MacVim provides this. Running Vim in the Terminal wouldn't provide this. I've just put out a survey to ask what editor coders who are interested in my app use...