vim

Unable to understand a line in .vimrc

I do not understand what the following line does in .vimrc nmap <silent> <leader>v :EditConfig<cr> It seems that nmap mean noremap silent seems to mean apparently no beep in Vim leader seems to mean the first character in the mode : v seems to mean visual mode EditConfig should be a command in vim in the mode : (However, it is not.)...

VIM Project and Tabs

Is there a possibility to combine the Project Plugin with Tabs? If i open a file in my Project Explorer, i want to open it in a new tab ... :) ...

Vim substitution of a list of words with another same length list of words?

I need to substitute a list of words with with an equally long list of words. So for example you have: "a","b","c","d","e","f" And you want to replace each word with the uppercase version of each word: "A","B","C","D","E","F" I know how to find each string using the regex: (a\|b\|c\|d\|e\|f) I know you could do a global substitution ...

Checking existing vim install's configuration options

I'm about to reinstall vim, and I want to find out what options the current install was configured with when it was built. Is there any way to do this by passing vim an argument or executing some special Ex command like "show-config-options" or something? ...

Vim, Python, and Django autocompletion (pysmell?)

Does anyone know how to set up auto completion to work nicely with python, django, and vim? I've been trying to use pysmell, but I can't seem to get it set up correctly (or maybe I don't know how it works). Right now, I run pysmell in the django directory (I'm using the trunk) and move the resulting tags to my project directory, then I ...

VIM and custom tagging

I am using vim in windows to edit assembly code. It is a nonstandard language and disassembly of the binary is done by a custom script so I define the format myself. I would like to use tags to be able to jump through the code for subroutine calls. I have searched around quite a bit and all roads seem to lead to using ctags to generat...

Automatically scroll screen in vim when near top/bottom?

I would like to have smarter screen scrolling when I'm editing. When I reach within X number of lines from the top/bottom of the screen, I would like it to scroll the screen as I continue moving the cursor (so I can always see, at minimum, X lines below or above). I know ctrl-y and ctrl-e will scroll, but is there a way I can have vim d...

How can I use VIM to do .Net Development

I have been researching coding editors but everytime I run up against some issue that is 1/2 coded or in the process of getting better. VIM offers everything in terms of a real powerhouse tool without all the UI fluff. What I want to know is how can I use it to build and compile .Net projects, .cs fro within VIM without shelling out to...

Any Emacs command like paste-mode in vim?

When i'm trying to paste some code from browser to Emacs, it will indent code automatically, is there any way to stop Emacs from indenting temporarily like :set paste in vim? ...

Soft wrap at 80 characters in Vim in window of arbitrary width

I want to use Vim's soft wrap capability (:set wrap) to wrap some code at 80 characters, regardless of my actual window width. I haven't been able to find a way to do this yet - all the soft wrapping seems tied to the width of the window textwidth and wrapmargin are both for hard wrapping (they insert newline characters into the file)...

making vim load omnicomplete from current working directory

Hi, I am trying to make vim portable by statically compiling it and then using my own vimrc and plugins and stuff that lives in my portable directory... I have recently used vi omnicomplete plugin that says to install it in ~/.vim/ directory... It works fine... but i want my portable vim to locate the omnicomplete plugin from the curr...

vim mapping

I am trying to set up a vim key mapping that will map the key ';' to A; - i.e. I want to auto append ';' to the end of the line. However I am having difficulty in setting this mapping up. I would also like to limit this to only java files if possible. Can this be done? Thanks ...

reuse vim instance from linux terminal

By making use of the remote feature in vim, is it possible to reuse an instance of vim to load up multiple files as needed. It will be nice to have that facility from within the same terminal instance. I am more keen to have a tab based interface, which available in vim 7+ The scenario should be Open terminal vim file1.cpp Edit - Sav...

project management plugin for vim

Can somebody recommend, if there is any, of course, a project management plugin for Vim (GVim actually, if it makes any difference). I'm not looking for anything extravagant, just something which will keep my files under one project name, and some sort of buffer which will display what files go under what project. You know what I mean,...

How can I make vim recognize the file's encoding ?

I noticed that most of the time, when using some encoding other than 'the standard english', vim doesn't recognize and does not display characters correctly. This is most easily seen by opening some ascii graphics, or similar files off the net, which use cp437 code page. Is there a way to make vim check for encoding when opening a file,...

Name of file I'm editing

I'm editing a file in ~/Documents. However, my working directory is somewhere else, say ~/Desktop. The file I'm editing is a Python script. I'm interested in doing a command like... :!python without needing to do :!python ~/Documents/script.py Is that possible? If so, what would be the command? Thank you. ...

How to easily test for guifont in vimrc?

I have many different machines that I am logging into and none of them have decent fonts in common. So, I would like to be able to have my first preferance for a font but if it does not exist on the machine use another one and so on. Has anyone done this before? ... So after re-reading the help on guifont it seems that I should be able...

Automate rails.vim

Hi, I use vim(in console) 7.1 for rails developments on OSX or Ubuntu. Here's what I repeatedly do when I edit files of rails. cd RAILS_ROOT vim :Rproject .project Is there a way that the last part is automatically done? For example, I just type 'vim -some_arg' and it automatically triggers ":Rproject .project"? If that's not possi...

Best way to switch from Vim to Emacs?

Despite being a Vim user, I'm interested in starting to learn Emacs. However, whenever I start to follow the Emacs tutorial, I end up hitting Vim commands by accident and get frustrated with it. Are there any better ways to make the switch? ...

How to apply new textwidth to whole buffer in Vim

I've changed the textwidth option mid-way through my file and I'd like to reformat the whole buffer to use the new width. What's the quickest way to do this? Solution - Vim documentation topic gq ...