vim

What can you do in Vim's visual mode that you can't do in command mode, and vice versa?

I've learnt to use marks and registers in Vim to select and operate on selections of text, and now I'm starting to learn and use visual mode. Is there any functionality that visual mode offers that isn't available in command mode, other than just the aesthetic appeal? In what scenarios would I use one over the other, and which is bette...

How do Vim's Control-O and Control-I work?

What do they do, and how do you use them? Any tips / tricks would also be appreciated. ...

Vim: gf opens directories, not files

I am trying to configure vim's 'path' and 'suffixesadd' so when I use gf over FILE_NAME, and pwd is /some/dir/, it opens /some/dir/FILE_NAME/File_Name.xml In vimrc I put: set suffixesadd=.xml set path=.,dir/** But, instead of opening File_Name.xml it opens the directory FILE_NAME What should I do to configure vim so it looks for fil...

what is the most comfortable way to ssh and vim/latex/c++ on android?

I'm debating if i should get droid x. i'd like to use it for work, meaning latex and code in c++. I use vim. i know this is possible with connectbot. but possible doesn't mean i can substitute a laptop. are there people that use bluetooth keyboard with android device and are happy? I don't mind the small screen. just curious about your...

ctag ignores classes in c++

how do you make ctags account for class in c++? when i jump to a tag of a function i get to the same name of the function but in a wrong class. B b; b.init(); and there are A::init() {} B::init() {} i put the cursor on init of b.init() and the jump is to A::init() {} instead of B::init() {}. Note, i didn't use a and b in my code. so...

Working with vim on multiple monitors

I have three monitors. I normally run one maximized xterm on each monitor, attached to the same GNU screen session. Can a similar model be used for vim? Is it possible to have three vims running, all sharing the same "vim session": Each vim window showing a different vim tab vim settings shared between all windows Not getting the "S...

how do you paste text into a vim colon command?

I'd like to paste yanked text into a vim colon command. Is this possible? ...

How to have colors in vim when :syntax on does nothing ?

Hello, Logged as root on a CentOS 5.3, I can't have colors in vim (7.0.237, minimal, common and enhanced rpms), even with :syntax on ... I can display colors with other commands, so I have colors (I don't know how many !) Any clue ? Thanks. ...

NERDTree open in a new tab, as last tab in gvim?

In NERDTree ShiftT opens file in a new tab, but tab is positioned after the tab in which NERDTree is opened. It is possible to open the new tab at the end of tabs? ...

How come when I use the tComment VIM plugin in a .ini file it adds/removes semi-colons instead of hashes as comment?

I am using gVIM and the tComment plug-in during editing the development.ini file in a Pylons/Python project. The default development.ini file has lines commented out using the hash # symbol which is the standard method of commenting out lines in Python. However, when I try to uncomment lines by using a tComment keyboard shortcut in gVIM,...

Regular Expression in gVim to Remove Duplicate Domains from a List

I need a regular expression written to use in gVim that will remove duplicate domains from a list of URLs (gVim can be downloaded here: http://www.vim.org/download.php I have a list of over 6,000,000 URLs in a .txt file (which opens in gVim for editing). The URLs are in this format: http://www.example.com/some-url.php http://example2...

How come whenever I run 'gvim' from Terminal in Ubuntu 10.04 Linux, I get a GLib-GObject-CRITICAL gvim error?

When I run gVim from Terminal in Ubuntu 10.04 with Gnome I get this error: (gvim:6226): GLib-GObject-CRITICAL **: g_object_ref: assertion `object->ref_count > 0' failed It looks like that everytime except that the number in between the parans (gvim: ) is always slightly different. How can I fix this with out having to run gksudo gv...

Gvim delete buffer when close tab

How to delete buffer when after right click on tab I choose close? ...

Cannot delete indents nor past insertion point

When I enter insert mode, vim will not allow deleting text behind where I entered insert. Also when I use auto indent, I cannot delete the indentations that get automatically created. I've tried a blank vimrc and even tried my own version of vim compiled from source. How can I delete properly in vim? ...

NERDTree: node not created!

Using vim; I'm trying to add a file (a .py file) into a directory via NERDTree. I just had to browse to the directory I want to put my file in and hit "m" and then "a" to name my file into the directory. Problem is that NERDTree keeps telling me this: "NERDTree: Node Not Created." which means that the file was not created. Why is that? ...

Disable Scrollbar in NERDtree with MacVim

I have been able to fully disable scrollbars in MacVim. However, when I startup NERDtree, NERDtree brings up a scrollbar of it's on the left. How can I disable NERDtree's scrollbar? Thank you in advance. I appreciate the help. ...

I want to customize the text vim shows in collapsed folds

I use folds for comments like # Stuff between the # are comments and automatically folded # But when folded they look like this +-- 4 lines: #-------------------------------------------------------------- I would rather have them say +-- 4 Stuff between the # are comments and automatically folded and not be highlighted, or w...

vim redraw does not redraw on OSX 10.6

Hi, I'm trying to open a PDF file from Vim using the commands let openpdfname = "!open " . expand("%:t:r") . ".pdf" map <F6> :silent execute openpdfname<CR> | redraw! The PDF opens up in Preview and all is well, except that the Vim screen is not repainted. I use vim 7.2.108 (shipped standard with OSX 10.6) from the terminal window. I...

VIM: exit insert mode with :normal command

When I go into insert mode with the :normal command (:normal i) for example, how do I exit insert mode? If I press <Esc>, or <c-c>, or <c-[>, VIM exits command mode and I can't run my :normal command. I put imap <c-e> <Esc> in my .vimrc but when I type <c-e> in command mode, nothing gets inserted. I can't figure out how to enter a "con...

vim: add comment macros

Vim is almost perfect for me. But I still want a line comment and block comment feature, I want to know how to write a vimrc to do this in python and javascript. No Addons ...