I would like to convert tab to spaces in gvim. I added the following codes to my _vimrc:
set tabstop=2
It works to stop at 2 spaces but it still looks like one tab key is inserted (I tried to use h key to count spaces afterwards). Not sure what should I do to make gvim to convert tab to spaces?
...
I apologize profusely for the incredibly newbish question I'm about to ask, but for some reason, my brain's locked up:
I'm trying to code in C on gvim on a virtual machine running Ubuntu, but my Hello World throws compiler errors which I suspect has to do with the quotes being different ascii(unicode?) codes than standard quotes. It do...
I've been using Vim for a while, and I can't get proper HTML indentation working in PHP files.
For example, what I want is for each child to be indented one tab more than it's parent, as shown below.
<?php
if(isset($sports)) {
//Do something
?>
<div>
<label>Uniform Size</label>
<ul>
<li class="left"><label for="s" class="small">S<...
I use ctags with my Vim and I rely heavily on C-] and C-T to tag back and froth between various functions in my project.
But if the function is in a different file, I'd like Vim to automatically open it in a new tab instead of the current tab. If I pop my tag stack using the C-T, I'd like it go back to the original tab where I pressed b...
I have noted that I cannot affect MacVim's colorscheme by commands in vimrc.
I have now a gray font on black background, which makes reading hard.
...
Recently I decided to encrypt my engineering log using vim's :X
encryption feature. I wrote down the password, but evidently I
misspelled something or messed something up because decrypting the file just gives
gibberish. To make matters worse, all my backups are somehow
corrupted (don't ask, I am not sure how either).
I am not going...
I know how to set the initial window size in gVim, but how do I get it to automatically restore the window dimensions from last session? Is this even possible?
...
Is there a way to get vim help to open in a vertical split pane rather than a horizontal one?
EDIT: to add to 42's answer, you can also control whether the window splits on the left/top (to[pleft]) or right/bottom (bo[tright])
e.g. :vert bo help
...
What is the best way to spellcheck in gvim? Is there an add-on or something?
Update:
I would like it to offer corrections as well.
...
This really looks like something I should be able to find on Google, but for some reason I can't make heads or tails of it. There's the EDITOR environment variable, the ipy_user_conf.py file, the ipythonrc file, some weird thing about running gvim in server mode and a bunch of other stuff I can't wrap my head around (probably because of ...
I'm using VIM, and I want to substitute some placeholder text with a long string, that spans several lines, which is already written somewhere else in the file.
Is it possible to replace a pattern with the contents of a register? Something like
:%s/foo/<contents of register A>
Otherwise, is it possible to replace with a range of line...
I use gVim in windows to edit my code (mostly C++). I use :make in gVim to compile the project, but this is a blocking operation, that prevents me from using gVim until the compilation is complete. How can I do :make asynchronously and still get the benefits of reading the errors back into Vim and jump to the errors in source code? Bonus...
I am not looking for an IDE suggestion for C++ development. I have found many discussions on that and tried EMACS, GVIM and Code::Blocks. I liked Code::Blocks very much than the other two. But it looks like most of the developer community is using tools like EMACS or GVIM. Is there a reason for this? Why Code::Blocks is less used?
I fou...
If I am in the middle of the function, I would like go to the very end of it in vim. I run into this problem as we sometimes have function of 500+ lines long (don't ask why).
I use vim, gvim.
...
I've been using vi/vim since '97 for various quick edits and
administration tasks, but have only recently considered using it to
replace Netbeans as my ruby editor of choice. One thing I find
extremely useful in both Netbeans and Eclipse is the Ctrl+Click "Go to
definition" feature, where you can ctrl+click on a class or method and
it wi...
When using VIM is there a way that :grep or :vimgrep will color the patterns returned to the buffer?
Thanks!
...
I want to search for multiple strings in vim/gvim and have them highlighted in different colours. Is there a way of doing this with out-the-box vim or with a plug-in?
...
Is there a way in vim to close all files (buffers, let's not get into that) from some directory and its subdirectories?
...
What's the vi/gvim syntax to replace a pattern with a pattern that includes <ENTER>? I know this is possible but never felt like diving too deep in the documentation to know how to do it.
Something like this:
:s/\(word\)/\1<ENTER>/
But correctly :)
Thanks
...
How do I make Gvim word wrap in such a way that doesn't break words in the middle?
...