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

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 ...
1
vote
0answers
16 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
13 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
26 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
30 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
27 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
107 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
24 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
20 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
17 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
38 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
28 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
28 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
28 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
33 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
54 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
32 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
28 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
26 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
26 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
17 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
40 views

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

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
20 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
52 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
29 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 ...
0
votes
1answer
37 views

Is there a way to copy/paste with iterm2 on osx over ssh with tmux and vim?

Given I am SSHed into a server and have tmux running, is there any straightforward way to be able to yank into a register in vim and: have that text be available in my tmux clipboard? have that text ...
0
votes
1answer
29 views

In tmux, after ssh a server, how to send R code in vim to R consol

I installed tmux and vim-r-plugin in local machine (ref: http://manuals.bioinformatics.ucr.edu/home/programming-in-r/vim-r), and use ssh to log in a server (only vim-r-plugin and screen installed). ...
0
votes
3answers
34 views

Script to open customized terminal session

I'm not sure if the title got across what I want to do, but here it is: I am working on a python project that involves a lot of classes. I use Terminal Vim to do my editing. As you can Imagine, it ...
0
votes
1answer
31 views

let mapleader = “\<Space>” not working arch linux

I'm trying to map space bar to leader key by using the code above but there's a problem - whenever I press space, the pointer moves forward a character, which annoys me. What am I missing? (gvim@arch ...
-1
votes
0answers
22 views

How to edit a text file over a network with netcat plus some $EDITOR

(no alternate suggestions like vim --servername, or vim over ssh, or "just use ssh", or nfs, sshfs please. Also I prefer to avoid more elaborate incarnations of netcat like ncat) I'd like to edit my ...
1
vote
1answer
50 views

Why is ~/.vimrc not having an effect until I type “:so~/.vimrc”?

I just want to change the tab size. I know the file is loading because it shows up in :scriptnames and I included an echo which runs every time I open vim. Why is ~/.vimrc not working automatically ...
0
votes
1answer
41 views

Hyphen converted to 'unknown character' when pasted to programs such as Putty, Notepad is OK

When a UTF-8-encoded hyphen (U+2010) is copied from a browser (I tried Firefox and IE) and then pasted to programs such as Putty and Vim (the Windows variants), all hyphens are showed as 'unknown ...
0
votes
1answer
20 views

Remap keys in replace mode in vim

I'm attempting to swap my semicolon and colon keys. I use this function func! FUNC_Remap(lhs, rhs) " Function which remaps keys in all modes " ":echom 'inoremap '.a:lhs.' '.a:rhs ...
1
vote
1answer
44 views

Can I recover a deleted file from .swp after auto-reloading?

This is related to, but not solved by the question “How can I recover the original file from a .swp file?”. I had two newly-created files a.txt and b.txt open in buffers. The active buffer was b.txt, ...
0
votes
1answer
32 views

How to stop Vim markdown syntax from highlighting as italic asterisks used to denote bold?

Using Vim 7.4 on Windows in ConEmu (though I have seen the same thing on other platforms/setups), I notice that the syntax highlighting is matching the beginning and ending double-asterisks as italic ...
0
votes
1answer
31 views

Vim starts with beginning of a “change” command

I'm having an issue with vim startup. Whenever I run vim somefile, it starts as though I pressed c just after startup. So, if I then try to immediately jump to the end of the file with G, it instead ...
0
votes
1answer
15 views

How to read shell and insert in text (using Emacs)?

I want to read and insert output from shell (bash) in a text using Emacs. My idea is to do something like :r!ls in vi, but using emacs.
2
votes
2answers
68 views

Reformatting vim files

SOLVED, see my answer. However, I figure this question is still a good learning exp for other novices like myself So I am working on this project, but I am working on it both at home and at work. ...
1
vote
1answer
35 views

Case insensitive sorting

Vim's default sort is case sensitive, and produces results like this: A B a How can it be made case-insensitive, to produce the following result given the same input? A a B
1
vote
1answer
27 views

vim: move to pattern without changing current pattern

While editing huge files, I need to move around based on pattern search (despite me using ctags, cscope, Lid) but I don't want to disturb the current highlight search while doing so. The reason being ...
1
vote
3answers
38 views

Vim vsplit redraw

Is it possible to redraw vim's screen if I do the following: Vim in small 80x24 terminal vsplit file2.c Maximize terminal It's all wonkey and I don't know how to make ti redraw the windows evenly.
2
votes
2answers
81 views

How can I construct a vim keymapping that inserts the current date?

I'm trying to create a vim keymapping that will initiate the creation of a new file, with the name of the file prefixed with the current date, waiting for me to finish typing the filename. Put more ...
0
votes
1answer
22 views

Vim 7.4 puts current line at top of window split when moving cursor between buffers

I have a split window with two buffers visible, and the top one is active and maximized using CTRL+w, UNDERSCORE (i.e., SHIFT+Minus). I put the cursor in the middle of the visible buffer, or at the ...
1
vote
1answer
18 views

Plugins cause gVim window to move (become “unsnapped”) in Windows

I have a couple of Vim plugins that seem to cause aero-snapped windows in Windows 7 (Aero windows, not Vim windows) to pop out of their "snapped" position when certain events occur. I don't know ...
1
vote
2answers
32 views

Vim go to link in Firefox

Is it possible to have a list of links in vim (seperated by newlines) and then use firefox to open these links? I would have to externally call FF, but how would I pass what is under the vim cursor ...
0
votes
1answer
40 views

The Vim documentation illustrates a “wrong way” to add comments to HTML. What's wrong with it?

The "syntax.txt" chapter in the official Vim documentation says: HTML comments are rather special (see an HTML reference document for the details), and the syntax coloring scheme will highlight all ...
1
vote
1answer
48 views

How can I cause vim to copy text to GNU screen's clipboard buffer?

I want to yank text with a command to vim and have it end up in screen's clipboard where it can be pasted to a different application via ^A] later. vim needs to do the copying (not screen's copy mode) ...
0
votes
1answer
37 views

How to perform search and replace in vim in reverse?

I need to perform a search and replace regex in vim of the style: s/search/replace/g However, I need to do this in reverse, from the bottom of the text to the beginning.