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

1
vote
2answers
792 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 ...
1
vote
1answer
15 views

Vim visual mode search and replace

When you run a search and replace on visual-line selected text, it shows this :'<,'>s/foo/bar Is it possible to get it to show line numbers instead of <>?
2
votes
1answer
4k views

How do I set up neocomplcache?

I just started using vim and saw a cool plugin: neocomplcache. My problem is that I can't get it to work properly. After installing, I took the example config from the help files of neocomplcache and ...
0
votes
0answers
31 views

Unknown option argument: “--multiprocessing-fork”

I have an error on Windows vim version 7.4.417 (no problems on Linux): Unknown option argument: "--multiprocessing-fork" . It is related to using python multiprocessing. How can I fix that?
0
votes
0answers
19 views

Python threads are not run in parallel [on hold]

In my python plugin I run several tasks (a lot) in parallel (16 threads). But my cpu utilization on gvim 13% (I have 8 cores). I see from process explorer that the thread are created. I tried the code ...
2
votes
2answers
58 views

What does @ mean at the end of filenames in auto complete in OS X?

I had yadr installed on my laptop, and I decided to get rid of it by running rm -rf ~/.yadr as instructed by its author. However after I did that weirdness commenced: If I try to edit my vimrc and ...
1
vote
2answers
66 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; ...
1
vote
0answers
27 views

How to use ctags and vim to jump to java methods

This used to work before I upgraded my Ubuntu system: ctags *.java vim -t fooFunc Which would then take me to e.g. Foo.fooFunc() But now, vim goes to the standard "tag not found" page. I now have ...
-1
votes
1answer
34 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 ...
7
votes
4answers
3k views

How do I keep vim from highlighting matches after a replace?

I have set hlsearch in my ~/.vimrc. This is normally very useful, but it's annoying to have to do :noh after I do a replace like '<,'>s/$/',/ (which highlights the end of every line after I run ...
0
votes
1answer
25 views

OmniCppComplete vim plugin and SSD on Ubuntu

I want to develop some GTK+ stuff in C and I was in need of using some plugin for completions. I have personal reasons why I don't want to use YouCompleteMe plugin. I configured OmniCppComplete ...
1
vote
1answer
22 views

How to change until the next character (vim), (with the next character can be a set of many)

With VIM you can change until an underscore for eg: ct_ But is there a way to select multiple characters? Say for example you may want to change until the first underscore or dash -. Is it possible ...
0
votes
0answers
20 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 ...
-2
votes
0answers
15 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
13 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
467 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 ...
33
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
16 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
23 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
376 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
199 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
8 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
136 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 ...
1
vote
1answer
15 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
21 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
206 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
19 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
21 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
34 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
498 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
142 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. ...
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
37 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. ...