Questions tagged [vim]

Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor.

Filter by
Sorted by
Tagged with
4 votes
3 answers
3k views

How can I automatically adjust the Gvim/MacVim window to the width of my vertical splits?

My overall goal here is simple, but the specifics are complex: I want to maintain each vertical split in my MacVim window at exactly 115 columns, regardless of how many splits I add. The story: I’m ...
ELLIOTTCABLE's user avatar
  • 2,465
3 votes
2 answers
938 views

In Vim, can I run an autocommand on entering Command-line mode?

The autocommand I would like to run is au CmdlineModeEnter * wall except that CmdlineModeEnter does not exist. I used to have a mapping defined like nnoremap : :wall<CR>: which worked fine ...
Owen's user avatar
  • 835
1 vote
1 answer
277 views

vim - special characters

I compiled vim 7.3.206 on Mac OS X 10.6.7. When I enter special characters, such as Ü or ß, it doesn't work but gets automatically changed to a mess like ?~\ or `?~_'. Why is that, and how can I fix ...
ryyst's user avatar
  • 111
2 votes
1 answer
565 views

How to compile Vim 7.3 with +signs on OSX 10.6.6?

I'm trying to follow this guide http://tech.blog.box.net/2007/06/20/how-to-debug-php-with-vim-and-xdebug-on-linux/ and I need to compile Vim with signs and python options. I have: downloaded the ...
audio.zoom's user avatar
  • 1,743
7 votes
4 answers
8k views

backspace not working, even after attempted fix

I tried following the instructions in Backspace key not working in vim , but I still have the same problem: BACKSPACE inserts a ^? That is to say: inserting set bs=indent,eol,start in my ~/.vimrc did ...
dsg's user avatar
  • 1,189
3 votes
2 answers
940 views

non-destructive piping in vim?

Is there a way to pipe selected text through an external command in vim, but not to replace the selected text with the output? Occasionally I want to copy something in a vim buffer to the X clipboard, ...
Patrick's user avatar
  • 31
2 votes
2 answers
2k views

Enabling Alt+Tab buffer switching like Windows or Firefox in Vim

How do I set up a buffer switch like Alt-Tab on Windows:? It cycles through a list sorted by last access first? So if I pressed Alt+Tab, I'd get the last accessed buffer. If I pressed it again, I ...
Matt Alexander's user avatar
1 vote
1 answer
217 views

gvim undocks in Windows 7 when adding or deleting vertical divisions. How to prevent it?

I'm using gvim in windowed mode and use Windows 7's feature to dock it on one side. Every time I open or close a vertical window within gvim (eg: ^w^v), Windows 7 decides to undock the program. ...
Isaac Remuant's user avatar
3 votes
1 answer
2k views

colorschemes are messed up in vim (mac OSX, iTerm2, zsh, vim 7.2 and 7.3)

For some reason in vim my colors come out looking weird. There are a few colorschemes that look correct like solarize and one called BusyBee but I'm not sure why most of my other color schemes come ...
Cup's user avatar
  • 33
1 vote
1 answer
481 views

Typing Romanian characters in Vim in Windows 7 [duplicate]

Possible Duplicate: Using Romanian keyboard with gVim I'm using Vim 7.3 in Windows 7, with the keyboard set to Romanian (Programmers). In the console and any other program, right-alt + s ...
Victor Grigoriu's user avatar
15 votes
2 answers
6k views

How to use a pipe to edit a file with vi

Lets say I have a file called file.txt. In it is a name of a file that I want to edit with vi. I want to do something like this so that I can edit the file: cat file.txt | vi However, that doesn't ...
tony_sid's user avatar
  • 14.3k
16 votes
6 answers
8k views

How to switch words in an easy manner (in VIM)?

I'm not good enough at vim to determine whether this was possible or not (which is why I came to superuser and not good) ~ is there a way in vim to easily switch two words? for example in def ...
funk-shun's user avatar
  • 2,633
1 vote
2 answers
2k views

How do I parse a Tiddlywiki into a bunch of plain text files?

I found a Tiddlywiki plugin to export all the tiddlers into one plain text file, but I want to take my Tiddlywiki file and export the individual tiddlers to individual text files (later to be migrated ...
Jonathan's user avatar
  • 2,099
3 votes
1 answer
801 views

How can I configure custom vim tags for my text file notes?

I've been using the notes.vim plugin to manage my notes, and I've been tagging them by making the second line in the text file have a list of tags prefixed with the @ symbol. One of my note files ...
Jonathan's user avatar
  • 2,099
5 votes
5 answers
2k views

MacVim <K> not working correctly: WARNING: terminal is not fully functional

(This question is posted in vim_mac user group in Google, but I did not get a solution) When pressing <K> on keyword, in terminal vim it will produce the man page correctly. However, in ...
Ivan Xiao's user avatar
  • 2,815
8 votes
7 answers
5k views

I Can't copy FROM vim. Can you diagnose my .vimrc file?

I based my vimrc file on a popular thread here on SO, and although it's great I have a real problem when it comes to copying text from vim to other linux applications. I suspect the error lies in ...
DevX's user avatar
  • 183
4 votes
3 answers
2k views

How do I avoid changing a file's Linux permissions when saving over a samba connection?

I have an Ubuntu development server and a Windows 7 workstation. I use Windows Gvim to edit files on the linux server, over a samba connection. Saving files from Windows change the Linux permissions ...
Matt Alexander's user avatar
2 votes
0 answers
340 views

Vim cursorshape in OS X Terminal

I compiled vim 7.3 with +cursorshape and added the following to my ~/.vimrc: set t_SI = "\<Esc>]12;purple\x7" set t_EI = "\<Esc>]12;blue\x7" but Terminal.app still displays the same ...
janeden's user avatar
  • 425
0 votes
1 answer
223 views

In Vim, can I map a key to a command directly, rather than using :foo<CR>?

I have a mapping defined like noremap <M-n> :tabn<CR> which works nicely, except in the following scenario: I run :make, I'm waiting while javac is thinking, then I suddenly realize ...
Owen's user avatar
  • 835
2 votes
1 answer
626 views

Remove Lines in VIM with Only Whitespace

Is there a vim idiom for removing all lines from a file that have only whitespace (including newlines)?
AJ.'s user avatar
  • 4,021
0 votes
1 answer
708 views

~/.vim folder has gone after vim reinstall (Ubuntu 10.10)

I had a problem with an arrow keys in Ubuntu (known as the A B C D problem). All advices I have found does not help me to resolve this bug. So, I deside to reinstall vim totaly. After I install it ...
user avatar
27 votes
7 answers
24k views

How to close buffer without closing the window?

I usually open a few windows and keep some buffers open. Since my MO in buffer exploring is to use quick shortcuts to :bn and :bp, I want to close unneeded buffers from distracting my buffer surfing. ...
mike3996's user avatar
  • 1,551
45 votes
5 answers
22k views

Count highlighted string length in VIM

I wonder is there a way to count highlighted symbols in vim (including white spaces)? UPDATE It shows rows count if my selection is on multiple rows. I need symbols count.
Nemoden's user avatar
  • 2,477
2 votes
1 answer
1k views

How can I map something to Shift+Alt+O in Vim?

I want to create a mapping for Shift+Alt+O in Vim. It works good in GUI version (gvim), but in console Vim decides that I do command "insert a row above this line and insert insert mode" (Shft+O). My ...
Nemoden's user avatar
  • 2,477
2 votes
2 answers
507 views

.vimrc use filename that is currently editing

I have a plugin for VIM which is basically provides an interface for my SVN (vcscommand.vim). And I've mapped :VCSUpdate and :VCSCommit commands of vcscommand plugin in my .vimrc. Everything is ...
Nemoden's user avatar
  • 2,477
5 votes
1 answer
5k views

Vim: yank highlighted text

I have a pattern highlighted and I want to copy all the text highlighted and paste it into another buffer. How can I do that?
Nahuel's user avatar
  • 51
12 votes
6 answers
8k views

Compile gvim from sources?

Recently, I've installed vim like so: hg clone https://vim.googlecode.com/hg/ vim cd vim sudo ./configure --enable-rubyinterp=yes --enable-pythoninterp=yes --enable-gui=gtk2 --prefix=/opt/vim make ...
Nemoden's user avatar
  • 2,477
19 votes
2 answers
23k views

How to specify shell for vim?

Can I specify my shell for vim? I'm running OS X and have zsh installed via Homebrew and am using MacVim. When I type shell in MacVim, the shell opens up as bash. How can I have it open as zsh?
neezer's user avatar
  • 723
1 vote
1 answer
1k views

Split up .vimrc, where to put what?

I've go a bunch of filetype dependent autocommands in my .vimrc, some of which are syntax related. I'd like to put these in separate file throughout my .vim/ tree, eg. some tex syntax would go in ....
romeovs's user avatar
  • 309
1 vote
1 answer
188 views

Vim seems to arbitrarily install scripts?

I'm trying to install Go Vim plugins as well as gocode. The installation finished with no errors, all my scripts are now inside ~/.vim. But for some reason they won't get loaded... I checked with :...
Blub's user avatar
  • 468
122 votes
4 answers
82k views

Reload .vimrc in Vim without restart

It bothers me when I wrote something into .vimrc and I have to close it first and open to get my changes be applied. Is there a way of reload .vimrc in Vim without closing it? E.g. I've added set nu ...
Nemoden's user avatar
  • 2,477
1 vote
1 answer
2k views

Changing text in current visual selection in Vim

I have some part of a line visually selected. I would like to remove all non-word characters in the selection and replace all whitespace characters with underscores. How would I go on about this?
Nickolay Kolev's user avatar
14 votes
7 answers
7k views

Is there any way to hook saving in Vim up to commiting in git?

I am new to the world of Vim, and I want to make it so that every time I save a file it is commited to version control. Is this possible?
gonzo.floyd's user avatar
1 vote
2 answers
1k views

Open last file in dir with vim

I write a journal and name the files in a YYYY-MM-DD.markdown fashion. When I want to amend something to the last entry, I would like to open it with a shortcut, instead of writing out the full date (...
Martin Ueding's user avatar
1 vote
1 answer
4k views

Vim does not let me :q (quit)

I have MiniBuffer plugin installed within my VIM (might be helpful, I guess). The problem with it is that it don't let me :q (quit). Once I go to normal mode, enter :q, window just blinks and does ...
Nemoden's user avatar
  • 2,477
11 votes
2 answers
2k views

Vim :buffers what %a and # mean?

What do %a and # mean in VIM :buffers window?
Nemoden's user avatar
  • 2,477
182 votes
5 answers
176k views

How to run Unix commands from within Vim?

How can I run Unix commands while I'm inside vim?
funk-shun's user avatar
  • 2,633
5 votes
2 answers
970 views

Remapping <Esc> in MacVim angers Vim itself

I have the following line in my .vimrc: nnoremap <Esc> :noh<Cr> This works fine in MacVim. Whenever I open Vim itself, its "command bar" starts off with: .2c For what it's worth, when ...
Closure Cowboy's user avatar
1 vote
1 answer
578 views

Edit files from Cyberduck in an existing Vim window

I use Cyberduck as my go to FTP client on Windows. I have but one complaint, and that is whenever I click the edit button to edit the remote file with a local version of gVim, it opens in a new window/...
Eli Gundry's user avatar
4 votes
3 answers
3k views

Middle mouse button paste doesnt work in gvim7.3

I recently upgraded myself to gvim7.3 (from gvim7.2) and I've lost my middle-mouse button paste functionality. Note: This problem is only in gvim, my vim works as expected. What magic stuff should I ...
Jeffrey Jose's user avatar
2 votes
1 answer
626 views

Manually loading package from Vim-LaTeX in Vim (because auto detection is not always helpful)

General question How you can manually load a particular package from Vim-LaTeX in Vim and how it can be automated for every LaTeX file? I am not interested in copying relevant parts from scripts of ...
przemoc's user avatar
  • 2,646
9 votes
4 answers
12k views

How can I make terminal VIM my default editor application in Mac OS X?

I am aware of MacVim, and while it's very nice I am constantly in the terminal. Why have two programs running when I could stay in one? So the question is, how can I make VIM (run in iTerm2) the ...
Matt Ryan's user avatar
  • 233
2 votes
2 answers
3k views

syntax highlight problem in gvim 7.3

I upgraded my ubuntu to 11.04 and my gvim got all messed up. I am basically starting from scratch and need some help. Upon recommendation, I am starting to move everything related to vim (plugins and ...
Omnipresent's user avatar
44 votes
5 answers
31k views

Vim - select/yank/delete content between brackets including brackets

In vim, is it possible to select content between the brackets inclusive of the brackets similar to yi{ yi( But I want to include the brackets.
Hamish's user avatar
  • 657
6 votes
2 answers
5k views

How can I open the current HTML file in a web browser from MacVim?

From MacVim is there a command to open the currently edited HTML file in a web browser?
Florent2's user avatar
  • 263
2 votes
1 answer
672 views

How can you use vim suffixes for NERDTreeIgnore?

Since I already define my "intermediary" files with set suffixes=.o,~,..., how can I reuse that to make NERDTree not show those files? It seems anti-DRY to put them all again in a different variable.
pkoch's user avatar
  • 123
9 votes
2 answers
2k views

How do I make vim's undo buffer persistent across sessions?

When I make an edit to a file and then leave vim, I would like to be able to undo that change when I reopen it later.
jcayzac's user avatar
  • 245
1 vote
2 answers
2k views

How to make Vim for Windows more Unix-y

Firefox 3.0 and earlier used CVS as its version control system, and if you were still using cygwin tools then you could choose which line endings you wanted to use, so for instance you could use the ...
Neil's user avatar
  • 869
1 vote
3 answers
7k views

Mapping keys in VIM on Mac

I had a previous problem that was solved, but it seems I am stuck once again. I'm trying to reassign the keys for switching between Windows to be more intuitive. I've found that you should be able to ...
Naatan's user avatar
  • 1,385
129 votes
4 answers
127k views

How does one switch between windows on VIM?

I'm using both Vim and MacVim (or well, trying to). I installed the Tagbar plugin but find it impossible to switch to the actual Tagbar window to make my selection. I've been reading loads about ...
Naatan's user avatar
  • 1,385

1
59 60
61
62 63
75