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
1answer
17 views

Vim replace occurences of word with and without first capitalized in one S&R command

eg I have this peace of Java code public String setType(String newType) { this.type = newType: } I select all of it and I would like to search and replace type by model, but regardless of the ...
0
votes
1answer
25 views

How to switch windows in Vim in Windows (the OS)?

I've read that Ctrl-W + hjkl switches windows in Vim from this answer, but when I try that it simply closes my terminal. I'm on Windows and using vim on a remote account in my terminal.
0
votes
0answers
26 views

Neither less or less -X clear screen on exit. (Trust me, I googled…)

Neither less or less -X clear screen on exit. At the same time, vim does.... Env iTerm2, protocol mosh, server Centos + tmux + zsh iTerm2: report term as xterm-256color tmux: set -g ...
0
votes
1answer
27 views

Cursor in gvim changes very slowly between insert and normal mode

I noticed rather annoying behavior in gvim which relates to changing my Linux distro to openSUSE. When switching from insert to normal mode (hitting ESC) the cursor needs at least second! to become ...
0
votes
0answers
22 views

Full Keyboard Navigation PDF Reader With Highlight Function on Windows

After being addicted to VIM, I feel I hate to move my hand out the keyboard to reach the mouse. I'm currently using Acrobat, sometimes I want to highlight some text. I have to select the highlight ...
0
votes
1answer
21 views

Vim colorschemes ONLY works in .vimrc

If I'm editing specifically ~/.vimrc in vim :colorscheme <some colorscheme> will do exactly what it's suppose to do. Only schemes in /usr/share/vim/vim74/colors will work though and not say in ...
1
vote
0answers
29 views

Display soft hyphens in VIM

How do I get (G)VIM under Ubuntu 14.04 to display soft hyphens in a UTF-8 encoded text file? The encoding and the fileenconding settings are both set to utf-8, and characters like the German umlauts ...
1
vote
1answer
23 views

In vim how do I auto shift-back a tab space when closing a tag

E.g. if I have <html> <head> </head> </html> </html> should shift back to be inline with the other tag, I've tried googling things like my title but all I ...
0
votes
2answers
20 views

Shortcuts in the vim minibuffer

In Vim, there is line at the bottom of the screen where commands are typed. IE :q :w :help etc I call this the minibuffer, but this is probably the wrong term. My question is: When I am typing a ...
0
votes
1answer
46 views

vim's vimrc messes up vim completely

i am using manjaro linux, and i installed vim using $ sudo pacman -S vim then i modified my vimrc file $ sudo vim /etc/vimrc then i added some cool things: set background="dark" set number set ...
0
votes
1answer
30 views

How to run something insert mode, get user input then return to insert mode?

I have inoremap <C-d> <C-o>:%s/\<<C-r><C-w>\>\C//g<Left><Left>, which works great (emulating sublime text's find-all multi cursor more or less). However it ...
0
votes
1answer
14 views

How can I get VIM to maintain the creation date for a file? (OS X)

So whenever I save a file in VIM on OS X, it seems to overwrite the entire thing instead of updating it. If I run ls -tU I can see that the creation date changes and it does indeed update to the last ...
0
votes
1answer
31 views

VIM Crashes/Freezes on specific files Mac OSX Mavericks

I've recently switched over to using VIM and use a friends .vimrc that works well for him https://github.com/dtothefp/dotfilesv2/blob/master/vim/vimrc.symlink I first installed vim through Homebrew ...
1
vote
1answer
17 views

Vim - mapping for moving between buffers silently

in my .vimrc I have the following mapping to move between buffers: nnoremap <silent> <C-b> :bp<CR> nnoremap <silent> <C-n> :bn<CR> This mapping works but it ...
0
votes
0answers
25 views

vim (7.4) command line does not display on win8.1 64 bit

The vim (7.4) command line does not display on win8.1 64 bit in mintty, rxvt, or command prompt windows. I am using the same config files on win8.1 as on win7, where vim displays correctly (same ...
0
votes
2answers
33 views

How to get vim like split open (horizontal) in notepad++

I would like to use notepad++ like vim split open in horizontal mode. Opening files in vertical mode can be done by move file to other view. I need to open files in vertical. Is there any plugin ...
0
votes
1answer
62 views

vim CTRL-B behaviour at top of file

I've been practicing to use VIM for some time now, but I still find the CTRL B behavior near the top of a file irritating and would like to know whether (or how) I can modify how it works. Normally ...
0
votes
1answer
26 views

Inconsolata font with powerline support and italics

Is there an Inconsolata font package with italics and support for powerline? I have only been able to find: powerline-fonts - has powerline support but no italics Inconsolata-LGC - has italics but ...
1
vote
2answers
40 views

Recompile vim with the same features

I want to recompile vim with the same features for a different linux distro. I only kept the source tar and I don't remember any of the arguments I gave ./configure the first time. What's the easiest ...
0
votes
1answer
31 views

Can't remap ctrl or alt combinations to commands

In Vim, I am ttempting the following remaps: nnoremap <A-1> :make<CR> inoremap <A-1> <Esc>:make<CR>i Basically, I want to remap alt+1 to :make. However, this remap ...
1
vote
1answer
52 views

E185: Cannot find color scheme for synload.vim (Line 19)

I've specified the location of .vimrc and .vim: .vimrc file saved at ~/.marslo/.vimrc .vim folder saved at ~/.marslo/.vim After set the rumtimepath, plugins (installed by vundle) and colorscheme ...
0
votes
2answers
22 views

Why the runtimepath in vim cannot be set as a variable

I've specified the .vimrc and .vim location. In my vimrc file, I found the runtimepath can be set as a absolute value likes: set rtp+=~/.marslo/.vim/bundle/vundle But it CANNOT be set as a ...
0
votes
1answer
16 views

Open Macvim within terminal without opening a new window

Every time I try to edit a file, I do mvim file.txt in the terminal then a new MacVim window pops up. But if I do vim file.txt, it will not open a new window. Instead, it will initialise vim within ...
0
votes
0answers
29 views

Linux, vim and ssh: why is vsplit slow?

As soon as I have more than one file visible with a vertical split (= :vsplit) the moves and screen refresh become sluggy. I've noticed that on many different Linux systems (old and my very recent ...
2
votes
0answers
28 views

Autoformat for Perl in Vim

I got a piece of code about perl: if ($a==1){ &err_report("$a"); while($b!=1){ &err_ok(); } } And, I want to format it in vim. After using command: gg=G, the code ...
1
vote
1answer
24 views

how to cancel highlighting the 80th column in vim?

I use python-mode and solarized plugin in my vim, and I think either one of them sets highlight at 80th column, so that I get a visual on how long each line should be, but actually python-mode will ...
0
votes
1answer
32 views

mapping command mode on iPad

On my Mac, I put the following in my .vimrc to use ii as the key. Note, I include the : in the .vimrc file, i'm not sure if you're supposed to but it still works :) :imap ii <Esc> I'm now ...
1
vote
1answer
33 views

What is the meaning of the @ symbol in a :let command

The Vim docs provide this command to clear the last search. Is one supposed to type @/ or /. I'm assuming the former, but it gives wonky results. If it is the latter, what's the purpose of @ :let @/ ...
0
votes
1answer
30 views

getting clipboard support for vim

I am using vim in a terminal emulator on Ubuntu 14.04. I have been using it for a while and had been getting along fine, until I had to copy lines from one file to another. After some searching I ...
3
votes
4answers
118 views

moving to a particular column in an empty line

I'm trying to use VIM for Word Processing situations where, for example, I might need to put the date at the 70th column of a line that has no other text on it. So, for example, if there's currently ...
0
votes
1answer
30 views

MacVim always return focus to terminal upon leaving

I'm running Mavericks and I recently started playing around with sshfs to try to boost my productivity by using MacVim (I've been using in-terminal vim for a few years now). I really like MacVim. I ...
0
votes
2answers
23 views

Pinned tabs in Vim?

Is there any way to do something similar to pinning a browser tab with Vim tabs? ie: Fix position on the left Minimise its size Prevent it being closed
1
vote
0answers
22 views

Vim with DBExt using FreeTDS on OS X

When I try to run a simple line of SQL like select 1 DBExt doesn't complain, the status bar says 'Executing SQL...` but nothing is showing up. Using homebrew I have installed unixODBC and FreeTDS ...
0
votes
1answer
18 views

It's possible to open current file, in another existent tab, splitted

I have two file in two tab. I'll like to open, for example, the second one file, inside first one, but splitted. Is this possible?
0
votes
1answer
53 views

Vim airline plugin bad characters

I'm having issue to display correctly the vim-airline plugin. Here's what it's supposed to look like Here's what it currently looks like. Note the >, which is not displayed properly. I tried ...
0
votes
1answer
39 views

vimtutor: command not found

My first time trying to pull up vimtutor fails. I get a vimtutor: command not found message. Strangely, running vim works fine. I've never installed Vim on my own, I just found it working when I type ...
1
vote
1answer
39 views

Vim - How Recognize Spaces as Tabs (set listchars=tab)

I wonder if it is possible to use a configuration for that command "set listchars=tab:▒░,trail:·" to "see" 4 spaces as tabs and get the effect of the picture below (using real tabs)... I use the ...
2
votes
1answer
37 views

VIM “upgraded” to expandtab and tabstop=8 on Python files

After reinstalling my OS from Kubuntu 12.10 to Kubuntu 14.04, VIM has changed its behaviour when editing Python files. Though before the reinstall all file types had noexpandtab and tabstop=4 set, now ...
2
votes
1answer
34 views

Vim replace a range of numbers

Is it possible in vim to replace 1-10 with 1,2,3,4,5,6,7,8,9,10? And I'm not talking :s:1-10:1,23,4,5,6,7,8,9,10 I mean like a command that will look at the range and replace it appropriately.
1
vote
2answers
61 views

Vim move cursor one character in insert mode without arrow keys

This might seem a little too overboard, but I switched to vim and I so happy about the workflow now. I try to discipline myself not to use the arrow keys, as keeping the hands on the alfa-keys all the ...
0
votes
1answer
35 views

Execute vim commands from a script

SO I've created a script that opens all of the files in a particular directory in vim in separate terminal tabs for me: #!/usr/bin/perl use v5.14; my $wd = '/home/luke/Pokemon-Battle-Simulator'; ...
1
vote
1answer
32 views

CTRL-X not showing the bottom menu (compatible/nocompatible issue)

I'm having some strange behavior in vim. When I press C-X in insert-mode, I see ^X flashing quickly in the bottom right, but I don't get the menu at the bottom. The keybindings seems to work just find ...
1
vote
1answer
28 views

Vim…what argument represents the matching word in a search?

What exactly is the syntax for say :s:you:your except to just append the r to you rather than replace it fully? I tried :s:you:\1r but no luck there. I swear I had seen syntax like this for similar ...
0
votes
1answer
33 views

Gvim middle mouse click horizontal scroll

I'm running Windows 7 x64 with Gvim 7.4 Using my external mouse, I was wondering how to achieve 'horizontal scroll', I read all the documentation about it but still haven't figured out how to achieve ...
0
votes
1answer
21 views

Why do certain replied emails missing threading when replied back in Mutt?

I use Mutt for emails. I have threads enabled and I can see that most of the emails are threaded in Mutt. So that is all good. But sometimes I reply to an email and the answer(from other person) to ...
1
vote
1answer
43 views

Moving inside identifier-words (underscore, camelcase) in vim [duplicate]

I would like a quick way to move between parts of a word e.g.: this_is_a_variable_name ^ ^ ^ ^ ^ thisIsAFunctionName ^ ^ ^^ ^ This would increase the speed in certain ...
0
votes
1answer
33 views

Vim conceal feature is applied to active line

I am using MacVim with the vim-latex plugin. There is a conceal feature turned on by default that converts LaTeX symbols to unicode in vim itself so the source is easier to read. I think this is ...
1
vote
1answer
15 views

Hide vim’s backups with a dot in the begining of the backup file name

I have the following line on my ~/.vimrc set backup So, every time I edit a file foo with vim, a backup file foo~ is created. Then the output of ls is polluted. I want vim to make the backup’s ...
1
vote
1answer
59 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. ...
-2
votes
1answer
35 views

Replace values in column, space delimited file in Vim

I have a file that looks like: 2067 24311 <hkxhk> {00} 2069 17219 <hkxhk> {00} 2071 20931 <hkxhk> {00} 2073 5557 <hkxhk> {00} 2075 2127 <hkxhk> {00} 2077 20947 ...