vim

Do you debug C++ code in VIM? How?

The question is to all you people, who use VIM to develop C++ apps. There was a period in my life, which can be described as 'I hate VIM!!!'..'VIM is nice!' However, having grown up mostly on MS Dev IDE, I've got used to those F5-F11 shortcuts when debugging code, watch window, call stack and the main code - all visible vithout need to ...

VIM open compile error in existing or new tab

When I compile or run a file from VIM all error references are opened in the last active buffer regardless if the file is open already in another vim tab. This behavior is very annoying. Is there any way to force vim to behave like ':tab drop' on compile errors? (See http://vim.wikia.com/wiki/Edit_a_file_or_jump_to_it_if_already_open) ...

What keys do you map <left>, <down>, <up>, <right> commands in VIM insert mode?

In Vim it is nice to use hjkl in normal mode and would be great to continue to use them in insert mode. I tried to map them to Ctrl-h, Ctrl-j, Ctrl-k, Ctrl-l: imap <C-h> <left> imap <C-j> <down> imap <C-k> <up> imap <C-l> <right> but it is not convenient especially because it masks Ctrl-H and backspace stops responding. Have you b...

How to turn off double indentation in vim?

I am writing python, javascript, html and other config files and I realize that when I enter newline to an unfinished line (i.e. unterminated string, still inside dictionary brackets, etc) I get double indentation. How do I fix this? ...

Is there a way to determine if a a highlight has already been defined in Vim?

Hi, For a filetype plug-in, I would like to define and use a default custom highlight name, e.g.: hi CsvColumn guifg=black guibg=NavajoWhite ctermfg=black ctermbg=yellow However, I would like to allow users to define their own in preference to the default, so to do something like: if <somehow or other check if 'CsvColumn' has NOT be...

Gvim: Ubuntu letter spacing (Consolas font)

Hello, Thought I could just copy my vimrc from my Windows to my Linux box but running into a few problems with the letter spacing on Ubuntu. Hope this is the right place to ask this question with all these new stackexachange sites. Update: The font is correctly installed I think. From the menu I can select it and it works fine. ...

How can I search in Vim, using regular expressions for letters (both ascii and non ascii) ?

Hi. In .NET, \p{L} matches any ascii or non-ascii letter (so it will match both a and ü). http://www.regular-expressions.info/unicode.html#prop Is there a Vim equivalent for this? In Vim \a or \w will only match characters in range [a-z] (or [0-9A-Za-z_]). ...

Vim Editor open always users home directory

I installed Nerd_tree plugin for vim on ubuntu 10.04. It is great plugin. But I met the following problems: after open nerd_tree to browse the files in /etc/apache2/sites-available/, now I close it, and go on with my work. Later I want open nerd_tree again to edit another file in /etc/apache, but nerd_tree shows me always the user home...

(vim profiling) VIM 256 colors mode, laggy php files

Hi, I'm using 256-colors theme in vim (set t_Co=256) and all php files opens about 8 seconds. It's my local dual-core machine It doesn't depend on color scheme I used (zenburn, wombat, wombat256) HTML, Python, JS or every else files opens momentary It takes about 8 sec even to create new php files (:o newfile.php) I've setting up my te...

Is there a reason some of VIM's motion commands are restricted to one line?

I'm beginning to learn VIM (I've downloaded an emulator plugin for my IDE) and unsurprisingly it's making me irritated and extremely slow. That is all fine and I realize it's a phaze everyone goes through. However this one feature is quite frustrating - being unable to jump to the next line via l, previous with h or search more than one...

Tab completion in Vim Commands

When I type a command in Vim, for example opening a file, I start to type the file name, and I want to press Tab and have Vim autocomplete the name. However, when I press Tab, vim puts in ^I for some reason. How can I make Vim tab complete? ...

Vim: how to transparently edit remote files on Windows, with ssh/Putty and netrw

Ok guys, maybe this one has been asked before, but I searched and ran threw nothing, so i'm taking a chance here. I'm using the latest vim (gvim 7.3), on Windows 7 64bits. I've got some remote files that I want to edit directly with vim, using netrw. Right now, I've got a fully working transparent ssh connexion to my remote hosts, tha...

Open a new window in Vim-embedded python script

I've just started wrapping my head around vim+python scripts (having no experience with native vim scripts). How can I open a new window to contain the stdout from a background process? Currently, after reading some :help python, the only option I see is something like: cmd = ":bel new" vim.command(cmd) ...

Portable unix-like environment for Windows

Hi, I am trying to put together a portable set of files/scripts that will enable me to mimic a unix like environment on Windows. I do not want to install anything. The setup needs to be able to live on a thumbdrive for example. Currently I am using UnxUtils to provide grep, and more. Im adding these to the Windows PATH environment vari...

How do I match a range of range combining diacritical marks in Vim?

I have a file, and some lines contain unicode characters with diacritical marks in them. I would like to delete all lines in the file that contain any unicode diacritical accent character (unicode 0x0300 - unicode 0x0362). I can blow away pretty much any other unicode in the file as range matches like the following function fine: :g/[{...

Vim "smartoutdent" for Python?

I use do auto indenting follow lines that begin with python keywords in Vim using this command. autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,... Is there a way to do a "smartoutdent" for keywords like return or break? Thanks. ...

Find a file in Vim

Hey, I'm new to VIM, just thought I'd give it a go so I'm still not 100% on what it is capable of. Is there anyway to search a directory recursively for a file (using wildcards when needed)? If not is there a plugin that can handle this? Thanks in advance ...

ctags not found : pthread_mutex_init

I have installed omnicppcomplete, taglist, cscope, etc., and I generated my tags in /usr/include using: ctags -R --c++-kinds=+plx --fields=+iaS --extra=+q . And in my .vimrc I set: set tags=/usr/include/tags,./tags,./..tags,./**/tags But now when I write my multi-thread programs, I can not switch to pthread_create and pthread_mutex...

Graph/Charting in Vim or Eclipse

I remember there's a charting/graph tool/plugin in some editor (maybe in vim or eclipse) so that we can plot some chart in pure text as follows: +-----------+ +-----------+ | Class A | ------------> | Class B | +-----------+ +-----------+ Anyone knows what that plugin is? Thanks! ...

make python os.chdir follow vim autochdir?

Hi, I use the autochdir option in VIM and I also utilize VIM's built-in Python interface. Is it possible to have the current directory for the built-in Python interpreter follow VIM's autochdir. For example, when I am editing a Python file, VIM's autochdir option puts me in the same directory as the edited file as far as VIM is concern...