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
13 views

Colorschemes in vim using mac

I've trying for a while to implement the colors in vim and they does not appear. I have saved various colorschemes in the vim/colors folder and all that seem to be fine. Also, when I load the color ...
-1
votes
0answers
22 views

In Vim, netrw mistakenly thinks file.py is a directory

Using netrw in Vim, I navigate to a Python script I want to edit (file.py), but most of the time it is listed as "file.py/" with a slash, indicating it is a directory. This is impossible to open. If I ...
-2
votes
0answers
13 views

Make GVim (or any program) always run as current user

So after finding out that running GVim as root was the cause of my last problem, I need to know how to make GVim always run as my current user. I can do this using gksudo -u myUser -l "gvim", but is ...
0
votes
1answer
12 views

VIM Sendscreen and behind the scenes buffer

I'm currently using vim via cygwin in conjunction with screen and screen-vim. Screen-vim has SendScreen which takes the entire current buffer and sends it to the attached screen. While this is nice, ...
0
votes
1answer
14 views

Vim from terminal can locate package, GVim cannot

So I've been installing Syntastic and JSHint for some Vim JavaScript syntax checking. which jshint returns /home/myUser/local/bin/jshint which vim and which gvim return /usr/bin/vim and ...
1
vote
2answers
463 views

Hide dot and dotdot (“./”, “../”) directories in NERDTree gVim

This is in gVim on Windows. NERDTree is registering ../ and ./ links in every directory. By the -> I thought perhaps they were shortcuts/symlinks that got added to all my directories, however in ...
30
votes
2answers
6k views

Reload file in vim [duplicate]

When I have a file open in vim, in this case a log file, I'd like to trigger a refresh and load any file changes into my existing vim session. I often use tail -f on log files, but as I'm using java ...
0
votes
2answers
15 views

Making Shift-Tab work in Vim when running inside ConEmu

I have these mappings in my initialization files for Vim: nnoremap <S-Tab> <LT><LT> vnoremap <S-Tab> <LT>gv the intention is to be able to unindent with SHIFT-TAB. ...
0
votes
1answer
22 views

Is it possible to differentiate between a scratch buffer and a new [no name] buffer?

I would like to know if there is a command I can run in vim to tell whether a particular window that has focus is actually a Scratch buffer or an empty buffer (such as when creating a new buffer that ...
1
vote
2answers
369 views

Cannot get konsole to show the right characters for fancy powerline

I'm using Kubuntu and the patched fonts for powerline are not working as expected... The screenshot is from terminal Vim, but gVim has the same problem in my machine. Does anyone have any ...
11
votes
4answers
2k views

Move cursor to beginning of non-whitespace characters in a line in Vim

In Vim, is there a way to move the cursor to the beginning of non-whitespace characters in a line? For instance, how can I move the cursor to the "S" in the second line below? First line Second ...
2
votes
2answers
11k views

How do I get Vim home directory?

I wanted to set the VIMHOME variable this way (common to Windows and Linux), let $VIMHOME=expand("%:p")."/..", so that VIMHOME is "~/.vim" in Linux or "path/to/vimfiles" in Windows. I put this in ...
1
vote
3answers
1k views

Highlight identical strings in vi(m)

One feature of Notepad++, which I find really useful and haven't found elsewhere, is the highlighting of other text that is identical to the one currently selected. Is there something similar ...
0
votes
1answer
22 views

How to choose the suggestion from suggestion list

I'm using neocomplete plugin for vim. I can't figure out how to choose the suggestion from the list. What is the meaning of letters [B] and [S]? How I can use them to select suggestion?
4
votes
3answers
3k views

Vim Solarized dark theme looks weird on iTerm2

I just installed the solarized colorscheme following instructions on the project's page. This is what it looks like now: which is not like those screenshots on the official page. Any idea how to ...
1
vote
1answer
27 views

Vim: cannot remap <leader> to comma or space

I've tried let mapleader = '<space>' let mapleader = ' ' let mapleader = ',' None of them works. VIM doesn't even show coma in the status bar (bottom of the screen?), but it works perfectly ...
2
votes
2answers
193 views

Why does the 'vi' command open 'vim' editor?

I am using Ubuntu 12.04. Not that I am complaining as I like my vim and prefer its many features. However, I’m curious as to why it does it. It is not aliased in .bashrc or .bash_profile. I am not ...
0
votes
0answers
7 views

Latex: customising syntax highlighting in vim

I made some custom commands to make writing equation blocks easier: % Equation starters \newcommand{\eqn}[1]{\begin{equation} #1 \end{equation}} \newcommand{\eqns}[1]{\begin{equation*} #1 ...
1
vote
1answer
13 views

Editing gcode with vim regex

I need to edit gcode for a model in particular I have to substract number 87 from all Z coordinates. Here is sample of gcode: ;LAYER:435 G0 F9000 X-38.420 Y-26.887 Z87.300 ;TYPE:WALL-INNER G1 F1800 ...
4
votes
2answers
2k views

How can I get a block cursor in Vim in the Cygwin terminal?

I am used to having a block cursor in normal mode in Vim. This makes sense with the Vim paradigm; when you press x, it is clear which character will be deleted. I've installed Cygwin on a Windows ...
7
votes
4answers
17k views

How do I make Vim beautiful (read: Textmate font/color ) on Mac OS X Lion? [closed]

I am just starting to make the Textmate to Vim switch. I love it, but it's so ugly. I'm running Mac OS X Lion and needed Ruby support so I am using Vim 7.3 as installed via Homebrew not the Vim Lion ...
0
votes
1answer
22 views

Wordskip in vim [ssh from mac to linux]

Word skip (ctrl key and arrow keys) work fine with vim on my mac in terminal. But, when I ssh from my mac to my linux box, ctrl and arrow key do not work (wordskip) instead delete a bunch of lines ! ...
2
votes
2answers
135 views

How to recreate a file with VIM?

I have myfile.txt with some text. If I type vim myfile.txt it opens the file. Is there some parameter for vim to delete the old file and create an empty new one? For example vim -recreate myfile.txt ...
0
votes
0answers
35 views

Developing big projects with Vim [closed]

Can anyone please share your experiences, tips and workflows that could be usefull for developing big projects with Vim? Is there a way of doing this without installing 20 different plugins. What ...
1
vote
1answer
14 views

How to bind a key to issue two commands in visual mode?

This question is more general than the problem I am currently faced with, and may not have a solution. But my real problem may have a solution if there is no general solution. What I want to do is if ...
0
votes
1answer
82 views

How to yank or delete multiple lines in Vim, all in different ranges?

I've seen a couple of questions about yanking and deleting a range of lines in Vim, for example, from line 5 to line 10. However, I haven't found (in documentation and googling) about how to ...
1
vote
2answers
38 views

Write to two applications at the same time

Is it possible to type on your keyboard and have it write in two different applications at the same time? I would like to write in Vim and another application which gives me intellisense (smart ...
19
votes
1answer
2k views

Can't resize vim splits inside tmux

Everything is working fine outside of tmux. But in tmux I can't resize vim splits with the mouse. I have set mouse=a in my .vimrc. Is there a solution for this? .tmux.conf: $ cat ~/.tmux.conf ...
0
votes
1answer
20 views

Can I make Vim filter entered ex commands?

I know that this is probably better to solve by not typing sloppily in the first place, but I just think it would be really nice to have. Since I've used Vim for a while, the ;w (I have mapped ...
2
votes
2answers
203 views

How do I select the text from cursor to white space with vi script?

expand('<cword>') The above can select the word from cursor, but I want to select more, that is the text delimited by the cursor and the first white space. How to do that in vim script? ...
0
votes
0answers
29 views

Forward slash got mapped to Oo in vim

I dont know how but forward slash is mapped to Oo(behavior similar to Shift-o o in normal mode) in vim hence I cannot search. I tried to start vim with --noplugin but the problem still persists. The ...
7
votes
2answers
2k views

Can I add a set of words to the Vim autocomplete vocabulary?

In Vim, I'm aware of using CTRL-n and CTRL-p to autocomplete words found in the document. This is great for promoting the use of descriptive method and variable names. I would like to add a set of ...
1
vote
1answer
17 views

difficulty opening a file(man page) with funny characters in gVIM

I did man ssh_config>a from cygwin I generated the file I want to print $ man ssh_config >a I then opened it in gvim as you see from the screenshot. I might join many of the lines (vim's J) ...
1
vote
1answer
50 views

Apply a count to a mapped command

I want to join every four lines of a file into a single line. I can do this by typing: JJJj Since I am going to do that repeatedly, I mapped it to a key: map <F5> JJJj Now, I can hold down ...
0
votes
1answer
20 views

Vim inserting white spaces after accentuations and other special characters on Mac

If I write the following text on vim: Tís teçxt contãins spécial charàctérs I will get: Tí s teç xt contã ins spé cial cha?| cté rs This wasn't happening before, when I had Mountain Lion. I've ...
1
vote
3answers
33 views

Notepad++/other editors: How to view same file in multiple columns with auto scrolling?

Is there any editor that allows me to have two columns, where the second column picks up after the last line of the first column? I don't mean cloning like in Notepad++ where I have two open copies of ...
0
votes
3answers
497 views

How can I disable persistence undo in Vim 7.3?

How can I disable persistence undo in Vim 7.3? I found that sometime, after doing some code modification, I want to go back to the state that i just open that file. But if have such persistence undo ...
1
vote
2answers
140 views

GNU screen changes vim syntax highlighting colors

I am trying to use vim inside a GNU screen session, but whenever I open vim inside screen the syntax highlighting uses completely different colors when compared to when I open vim outside GNU screen. ...
1
vote
1answer
55 views

In VIM, how do you delete to end of line while in command mode :?

While in VIM, I have a leader shortcut for the following: :!git commit % -m 'updated '; git push; ...
0
votes
1answer
40 views

How do I define a vim function on a single line?

Since | is used to separate commands, I thought I could just do this: :function! SomeFunc() | return 0 | endfunction It works fine when I type it on separate lines (entering the first line causes ...
0
votes
1answer
34 views

Cannot copy from Vim under Tmux into clipboard using "+p on Ubuntu

I'm using zsh, tmux, and Vim and for some reasons recently, I've noticed I cannot copy from Vim to X clipboard under tmux using "+y. Any idea how I can troubleshoot this issue? It used to work before. ...
0
votes
0answers
36 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
218 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
36 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 ...