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

learn more… | top users | synonyms

0
votes
0answers
38 views

How to prevent terminal bell from going off when exiting vim from within a nested screen session

My vimrc file contains the following lines to set the window title start and end strings respectively. When I enter a vim session and my konsole terminal is either outside of screen or within a ...
2
votes
2answers
222 views

Prefixed (b:, g:) settings in Vim

I installed this plugin with Vundle and noticed that it has some settings (the README calls them variables) like: b:javascript_fold and g:javascript_conceal The README says I, "can add ...
1
vote
1answer
42 views

How to set Vim inside Tmux as default system editor? (Linux)

At all times I have Tmux running, with Vim inside it. I want text files to be by default opened in that Vim instance, and not a new one. I presume I need to somehow change the default text editor as ...
8
votes
7answers
3k views

Emacs equivalent to VIM ci"?

Does emacs have the equivalent of VIMs ci" command? Basically I want to replace the text inside a set of quotation marks. In vim I can ci) or ci] or ci} to "change inner *"...
4
votes
2answers
632 views

Using Emacs align-regexp to format tables

Vim has the neat Tabular plugin that allows you to quickly align some text. I use it a lot to align blocks of code along a certain character (mostly things like = and =>). But it also does a very ...
39
votes
4answers
21k views

256 color support for vim background in tmux

while using vim within tmux I can see that 256 color support is enabled. with $tput colors However changing the colorscheme in vim while in tmux will change the colorscheme on a per line basis but ...
0
votes
4answers
2k views

Open a text file in cygwin's VIM

Is there any way to configure Windows to open text files in Cygwin's VIM instance? I am currently using GVIM but I find it limiting for many reasons. Unfortunately, I can't just install Debian on this ...
0
votes
1answer
23 views

How to separate Vim themes for LUI and GUI with same general configuration?

I like twilight theme for my Vim, but this theme has 2 major versions, twilight256.vim dedicated for terminals and twilight.vim designed for graphical interfaces. I just wondering how to separate ...
0
votes
1answer
18 views

Scripting a precompiled Vim with Python, Perl… — are the DLLs all I need?

Assume I download a precompiled Vim (all required settings are enabled) on Windows. Now, I want to script it using Python, Perl, and whatever else Vim supports. Are the DLLs all I'm going to need (for ...
1
vote
1answer
29 views

YouCompleteMe set flags for filetype

let g:syntastic_c_compiler = 'clang' let g:syntastic_c_compiler_options = ' -ansi -pedantic' let g:syntastic_cpp_compiler = 'clang++' let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++ ...
1
vote
2answers
45 views

creating a simple vim syntax highlighting

i have a simple sort of a database file which consists only of entries in the following format variable=value i want to create a simple vim syntax highlighting for it and set it for specific ...
3
votes
3answers
6k views

Save vim settings across launches?

My professor assigned an ssh account to every student in my programming class and mandated that we use VIM for text editing. I discovered :set nu and :set auto indent via Google. I noticed that those ...
15
votes
7answers
4k views

How to make Emacs read buffer from stdin on start?

With Vim I can easily do $ echo 123 | vim - Is it possible to do with Emacs? $ echo 123 | emacs23 ... Emacs starts with a Welcome message $ echo 123 | emacs23 - ... Emacs starts with an empty ...
1
vote
1answer
38 views

Setting Vim key bindings for the MySQL client

I add these following lines to ~/.inputrc and now the Postgres client, psql, uses Vim keybindings. set keymap vi set editing-mode vi However, this does not work for MySQL. I understand that MySQL ...
2
votes
2answers
51 views

Sort structures in file [duplicate]

For example I have file consisting of structures like name = { foo = bar; ... }; So in file there are lots of structures like this. How can I sort them (I'm using vim but emacs is surely ok ...
0
votes
2answers
40 views

Vim: how to perform this task every time I open a file?

For a time I have one vim configuration on my laptop and another on my desktop, so when I edited filed on my Dropbox between the two I would end up with format issues. Specifically, I had ...
5
votes
2answers
3k views

Colorscheme in .vimrc not working

I've looked through a bunch of questions here, and I'm pretty experienced with Vim, but for some reason my .vimrc isn't setting the colorscheme any more. I don't know when this started, but I just ...
0
votes
2answers
28 views

I have a windows ssh host (freeSSHd). How do i get 256 colorschemes to work in vim when connecting through putty?

What I'm trying to accomplish is to putty onto my windows host, and then use vim with full color functionality. How is that possible? I'm currently using freeSSHd but I'm willing to change to whatever ...
5
votes
5answers
8k views

Are there any autocompletion plugins for vim?

Is there an autocompletion plugin for vim? What are my options here? At the moment I'm using AutoComplPop, but it has bad integration with snipMate that I use and dead slow on Ruby files (even < ...
0
votes
1answer
32 views

vim: having tabs in a single viewport

I would like to have two viewports, one with Nerdtree and the other with tabs of the files I'm editing. Is this possible? Whenever I try to split and then opening tabs I get one tab with 2 viewports ...
1
vote
1answer
349 views

Windows 7: “Open with” context menu not always available when I want it

I recently formatted my hard drive, and right now there's not much on here except a clean Windows 7 install and the most recent version of Vim for Windows. I told Vim to install its own context menu, ...
0
votes
2answers
545 views

objective-c syntax highlighting for vim

I would like to have an excellent syntax highliter for obj-c that matches or beats the one in my xcode.. I've installed base16 through yadr, and i've also installed cocoa.vim to have better syntax ...
0
votes
4answers
141 views

Vim: How relieve PHP programmer's typing workload?

For example, the most common code maybe is something like this: $title = $_POST['title']; $price = $_POST['price']; $area = $_POST['area']; $property = $_POST['property']; $room = $_POST['room']; ...
0
votes
3answers
1k views

Is it possible to run vim on a remote server via ssh but show UI on MacVim on my laptop?

My projects files are on a remote Linux server. The project can be very large. I need to find files within the project when using vim. If I mount the remote filesystem onto my local machine with ...
0
votes
1answer
79 views

Getting rid of characters when doing gf in vim

I am using vim for coding. When I have something like the following: SomeModule->actualMethod() if I take the cursor to SomeModule and I do a gf I get a complaint that SomeModule- does not exist in ...
0
votes
2answers
192 views

What does shiftwidth do in VIM editor

I read this about shiftwidth option on Google: To change the number of space characters inserted for indentation, use the 'shiftwidth' option. Ok Ok, but what's that more exactly? How can I try this ...
2
votes
5answers
734 views

Does anyone else use mouse in Vim? [closed]

I have been using Vim for a couple of months and I think I've fallen in love with it. But I am still using the mouse for selecting text and scrolling. Every tutorial, advice and blog post I have ...
0
votes
1answer
210 views

Setting active window on Vim startup

I'm using MacVim with the Taglist plugin, which I want to be open all the time when I start MacVim. So in my .gvimrc I have the following :TlistToggle Which opens the sidebar when I load my MacVim ...
1
vote
2answers
2k views

Vim: How to indent html code correctly in php file?

In php file : <?php ... ?> <html> </html> I could not indent the html source code with operator =. How could I indent it?
2
votes
1answer
615 views

Set default editor for crontab -e invoked with sudo

I'm using Bash on Debian Squeeze. I just read this topic: change default text editor for crontab to vim I have exported both variables VISUAL and EDITOR to vim for normal user and for root. And this ...
0
votes
4answers
295 views

How to get the original vim files on mac?

I accidentally deleted some files in the vim73 folder on my mac. How can I get the original files of my vim?
0
votes
3answers
61 views

Vim Colorscheme

What do I change in vimrc to make the while and if/else/elseif in this screenshot a different color? EDIT----------------------- This is a custom colorscheme and I am wondering what I change in ...
2
votes
3answers
832 views

vi editor text is flashing and unusable

I'm using vi on linux - vi --version gives: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 16 2010 12:47:47) A few weeks ago, for no apparent reason, every time I use vi the entire text is flashing, ...
1
vote
2answers
884 views

Increase the space between lines in vim

I think the title says it all. I've done my homework and the only command that I found was: :set linespace=3 but it doesn't seem to work, neither on the Mac nor in Linux. Edit: In Mac OSX you can ...
1
vote
2answers
62 views

From file explorer into Vim buffer instead of window

I'm on Windows 7. If I open a file from Windows Explorer then it opens as a different instance of Vim. I'd like it to just open as a buffer inside the existing instance of Vim.
1
vote
2answers
597 views

How to disable scroll wheel in Vim

I am using Vim 7.3.829 on Windows 7, how can I disable the scroll wheel completely in the settings of Vim?
3
votes
2answers
136 views

How can I get the place where a function is defined in VIM quickly?

I've installed taglist and nerdtree plugins, and I wonder if there's way to quickly find the location where some function is defined, just as what Control and pressing function name in Eclipse does? ...
0
votes
2answers
346 views

Have vimwiki set filetype only within wikihome

I've started to use Vimwiki to create a personal wiki. I'm a big fan of the plugin, but unfortunately it hijacks all my Markdown files and sets their filetype to vimwiki. This is happening with .md ...
3
votes
1answer
2k views

tmux: enable mouse scrolling in vim instead of history buffer

I have just started using tmux 1.8 recently, after working with screen for a while. After reading things here and there on the internet, I came up with following ~/.tmux.conf However when I open vim ...
2
votes
1answer
27 views

Unintentional vi mode in iTerm on Mac?

I occasionally find that while working in iTerm the default Readline key bindings are replaced with the vi keybindings. For example, I will try to go to the beginning of the line with ctrl-a, and ...
1
vote
1answer
42 views

How To Search for multiple multi-word strings in vim?

For example I'm trying to search for the occurence of both hello world and goodbye world in the same line. I've tried a bunch of difference iterations. For example, if you want to find one multi-word ...
2
votes
1answer
36 views

How to include all Vim config files in some folder?

I want to reorganization my vim directory to be like this: - dotfiles |- vim | |- config | | |- global | | | |- basic.vim | | | |... | | |- plugins | | | |- ctrl-p.vim | ...
0
votes
1answer
18 views

VIM substitute environment path to get include path

I want to build an include path from a environment variable on vim. I want to keep only the instances which ends as /share/bin on this variable, and change them to include. I want to do this on ...
0
votes
1answer
32 views

Vim makeprg with multiple commands (cd + make)

I want vim to run makeprg with two commands, namely: cd\ cmt;make; but when I do so, it get stuck on the make command. To clarify, when I mean get stuck, I mean that it ends compilation but it ...
0
votes
1answer
15 views

vim: Mapping from .vimrc not applied

In my vimrc, i mapped nnoremap <tab> >> and nnoremap <s-tab> <<. The second mapping works fine, the first one however seems to be forgotten. If i map it manually when in vim, ...
0
votes
0answers
28 views

in vim, making files added to quickfix menu with cexpr command navigable

I'd like to be able to show all of the files from a Git commit in a vim quickfix menu. I can do this with this command: :cexpr system('git diff-tree --no-commit-id --name-only -r a44fcf896') (The ...
2
votes
2answers
304 views

ubuntu mono font on vim across linux and windows have different spacing?

On Windows gVim: On Ubuntu gVim (same on Vim): Why is the padding across the two operating systems so different? Is this a changeable feature?
0
votes
2answers
117 views

Vim: How to append even lines to odd lines

I have the following lines. 1 4 2 10 3 20 4 35 5 56 ... ...(many more lines after this) And I want to change to the following in Vim. 1 4 2 10 3 20 4 35 5 56 ... ... How can I achieve this?
47
votes
5answers
26k views

How to show the current column in the statusbar in vim?

I would like to show the current column in the statusbar, as is common in many other text editors. E.g. it's good to know if you are around column 80 or above. How to show the current column in the ...
0
votes
0answers
91 views

Ubuntu 14.10, Compiled or Installed vim-gnome, doesn't paste from stopped vim

I just compiled vim with many many different ways and I can't get it working properly on Ubuntu 14.10. this is my configure: ./configure \ --enable-pythoninterp \ --enable-cscope \ ...