vim

Where can I modify (at least find the files) completions in Vim?

I turned on completion in Vim: autocmd FileType python set omnifunc=pythoncomplete#Complete autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS autocmd FileType html set omnifunc=htmlcomplete#CompleteTags autocmd FileType css set omnifunc=csscomplete#CompleteCSS autocmd FileType xml set omnifunc=xmlcomplete#CompleteTa...

How to tell Vim: Open current document in Browser and Refresh?

Right now I open archives in my browser (localhost) with the follow line: :! start "http://localhost" file:///"%:p""<CR>. It is possible to tell Vim: Open Firefox and hit refresh? (I don't want to refresh the current document I'm editing in Vim because if I open, for instance, the current CSS, the results won't show up in the browser. ...

Is there some pattern behind the many VIM commands?

I have to add a VIM personality to an IDE. I never used VIM for more than the most basic edits and i'm now overwhelmed by the complexity of the command structure. Is there any overall structure for the combination of counts moves and insert/delete commands? I just can't see the wood for the trees. ...

Weird rendering bug in Vim (or feature?)

There are small lines appearing sometimes in front of words. In the pictures they are to the right of +syntax/ and swo and delmenu.vim. Is this a bug or those lines mean something? Do this happened to you before? Would they get worse in the future? PS: I'm using Microsoft Windows XP SP2 AMD EDIT: I change the font to Consolas and ...

VCScommand for VIM

I am trying to use HG (Mercurial) with the Vim VCScommand plugin, but am running into a problem "Too many matching VCS: git HG". I removed the vcsgit.vim and the HG binding seemed to work. I thought VCScommand used the folder to determine, which VCS one was using. I guess this is a flawed assumption. ...

Since Emacs and VIM are just text editors, does that mean I have to copy paste the code into an IDE so it can be compiled?

Not much else to ask. ...

Does gVim store all its files in the Program Files/vim directory?

Does gVim store files (specially preferences) in other directories rather than Program Files (for instance in %apps% like emacs)? If not, can I carry gVim in a USB frashdrive? (There's a portable version of Vim, but since it doesn't store anything in other folders I can't figure out it needs a portable version). ...

How do I change tab size in gVim?

Every time I add a selector in CSS and I press Enter to define the properties it ends up like this: #selector { property: value; } (8 tabs) How can I configure gVim to make it like this: #selector { property: value; } (4 tabs) ...

How to stop "warnings" when using vim omni-completion with python?

I am trying vim's python omni-completion script, it works, but I got problem. After I start vim, the 1st time I press to ask vim to complete python code, many warning shown up. That's because some python libs in my project use md5, which will trigger a warning message in python 2.6 That's very ignoring, how to stop vim/python from is...

How do I run the file through a shell command in vim for a certain filtype

I now have a solution to this question, which leads me to the next question: how do I run "xmllint --noent" to all .xml files when opening them in vim. I have an example to do --decrypt on load and --encrypt on save for .gpg in my .vimrc, but it is so complicated that I cannot really figure the relevant parts. My latest attempt is: aut...

Problem mapping Tab to Omicompletion in GVim

Omnicompletion works pressing <C-X><C-O> making a dropdown list appear. I wanted to map it as <S-Tab> <C-X><C-O> but first I wanted to test it as: <C-F5> <C-X><C-O>. It does complete the word but the dropdown list doesn't show up. (the same happens with the plugin SuperTab). Any suggestions? EDIT: *it Works* like this inoremap <S-F5> <...

How to run mvim (MacVim) from Terminal?

Apologies but I am new to the whole UNIX/Mac command line. I have MacVim installed and I am trying to set it up as the editor for Git (version control). But I can't run 'mvim' from the command line as it isn't recognised. I don't see an option in MacVim to do this for me. I am guessing I need to edit a PATH variable on the Mac? ...

Weird characters in GVim's visual mode

When I enter visual mode (from normal mode), and when then I press : there are these characters: <,'> after the : They are a feature or a bug? Windows XP SP2 ...

Text editor and text-file-based hyperlinks

Background: It seems that some text editors and IDEs are starting to get more "browser-like" in their features. Specifically, one such feature is the ability to treat ordinary text in an open text buffer as a hyperlink to another file, resource, or even a runnable command. Programming this as an editor plugin or macro Since this seems...

Incorrect comments set for php in vim

My vim used to auto-continue comments in php. For example: /* | <- cursor here Then, pressing Enter gives me: /* * | <- cursor here and again, gives me: /* * * | <- cursor here etc... As far as I understand it, this is controlled by the comments and formatoptions options. However, whenever I open a php file now, comments ...

Key repeats and ranges in Vim mappings

I want to define a mapping in my .gvimrc such that if the last key pressed is held, the triggered action is repeated. Specifically, I want to do something like map <SPACE>t :set transparency-=1 map <SPACE>T :set transparency+=1 for MacVim, but I want the transparency to continue to be decreased/increased when t/T are held (don't want ...

Using Ctrl-A in vim commandline to increment a number

Hi, In normal mode (in vim) if the cursor is on a number, hitting Ctrl-A increments the number by 1. Now I want to do the same thing, but from the commandline. Specifically, I want to go to certain lines whose first character is a number, and increment it. i.e. I want to run the following command: :g/searchString/ Ctrl-A I tried...

Vim insert mode: Comments (#) go to start of line

Hey. Whenever I want to add a comment to an indented line in vim, I click shift-o (open a new row above the current, switch to insert mode) and start typing a python comment (using #). That hash is then magically moved to the start of the line (no indentation) and I have to click tab a few times. Anyone know how to work around it? ...

How to jump to tab if trying to open already opened file in Vim

I'm opening new tabs using command :tabnew path/to/file Is it possible to force Vim to jump to already opened tab with file, if I'm trying to open file which is already opened? ...

Automatically quit vim if NERDTree is last and only buffer.

I have the following in my .vimrc: """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Open NERDTree by default """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" autocmd VimEnter * NERDTree autocmd VimEnter * wincmd p So, % vim file.txt opens NERDTree and focuses the cursor in the file.txt buffer. I m...