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
1answer
6 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
11 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
31 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
22 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
19 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
19 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
1answer
19 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
28 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
19 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
44 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
37 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
18 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
40 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
27 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
24 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
13 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
61 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
31 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
25 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 ...
0
votes
3answers
35 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
77 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
20 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
16 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
28 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
38 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
47 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.
0
votes
2answers
35 views

In vim, why is it :-1j to join with the line above?

In vim, why is it :-1j to join with the line above? e.g. :g/^ /-1j to join all lines that start with a space. The commands are easier to remember when you understand how they come about and in this ...
0
votes
1answer
19 views

how to save changes to config directory

I'm trying to save changes to a /var/www/ config directory for my virtual server. I hit Ctrl X and am now in "X mode" but my Putty is unresponsive. What can I do to save these changes and exit?
0
votes
0answers
28 views

Sublimetext 3 Vintage - Insert multiple lines with Open command

With open command you can insert a new line above or below the current line. Is there a way to insert multiple lines? I've tried 2o 3O 2\o 2\o but it doesn't work.
0
votes
2answers
44 views

Highlight cursor after changing buffer in vim

While using vim I have trouble finding my cursor quickly after entering another buffer, especially if I have many splits open. I fixed this by writing a function which is called by an autocmd when a ...
0
votes
0answers
22 views

Syntax highlighting in .vim for python segments files on windows

I use python a lot in my vimrc. On my linux machine it correctly highlights segments of code between func! VIMSCRIPT_FUNC_WITH_PYTHON() python << endpython import vim ...
1
vote
1answer
24 views

How to send commands from a file to VIM?

This is the content of cmd.txt: :w 2.txt :q In command line, I do D:\>vim 1.txt<cmd.txt I expect cmd.txt as input stream (rather than my keyboard) and vim will save 1.txt as 2.txt and ...
0
votes
1answer
33 views

VIM - How to select a substring

I have the following line, that has no spaces - 123456789abcdefghij01234123456780900dfasdfsadfsadfsa I want to select (highlight for yanking) 10 characters, starting at column 10. I can ...
1
vote
1answer
26 views

Possible for vim marks to point to the character to which they are originally set instead of the character's original line/column location?

Is it possible to make vim marks (e.g. mm) point to the character to which they are originally set instead of the character's original line/column location? For example, if I type mm on the first ...
0
votes
2answers
41 views

Give active split all of screen besides 5 lines for inactive splits

edit Answer provided I'm trying to split my window in vim by running the following: :sp The desired behaviour I'm trying to achieve is to limit the inactive split to five lines while giving the ...
1
vote
2answers
32 views

Can I Soft-Link files from my desktop to a server in Linux

I am looking for creative ways to sync my vim files (~/.vimrc, ~/.vim/) on the server I am running. Can I soft-link files from my desktop machine (Fedora) to any of the nix servers I am on?
0
votes
2answers
30 views

Add quotes to large number of words in vim

So I created a large number of javascript objects with literal syntax and I forgot to use quotes for the keys of many, many key value pairs. How would I devise a regex to "add single quotes to any ...
2
votes
1answer
24 views

Vim marks and US international keyboard

I use a US-international keyboard so that pressing 'a produces "á" while on insert mode. However, I would like to access a mark named a by pressing 'a under normal mode. That doesn't work and as a ...
0
votes
1answer
29 views

How can I edit the identical part of multiple files at once?

I have multiple HTML files that form a small website. Several lines of code are duplicated at the top of the files (although the <title> differs), and a few lines are duplicated at the bottom. ...
0
votes
2answers
35 views

Ctrl+TAB is not working in vim with gnome-terminal

I have a serious problem. Usually, the editor I use is vim, though I can't map ctrl+tab action. I wanna switch tabs with ctrl+tab (ctrl + shift + tab). In xterm, this mapping is enabled, and the ...
4
votes
1answer
69 views

Vim can break file permissions?

I was using Vim the other day as usual, when I noticed something strange. Here's what I did: ~$ touch testfile ~$ ls -l | grep testfile -rw-r--r-- 1 username groupname 0 Jul 23 10:00 testfile ~$ vim ...
6
votes
2answers
562 views

Why does VIM show the Unicode code point and not the UTF-8 code value?

Consider this supposed line of code that I found in a PHP blog, note the quotes: throw new Exception(“That's not a server name!”); Those quotes are RIGHT DOUBLE QUOTATION MARK (Unicode code point: ...
2
votes
0answers
51 views

LC_LOCALE settings interactions between Mac OSX and LINUX via SSH

I have been struggling with the following problem for years now. I have never been able to solve it, and I adopted several workarounds to keep being able to work. However now I can't stand it anymore, ...
0
votes
0answers
21 views

Override default .csl bibliography file with vim-pandoc plugin

I use vim and pandoc markdown with the vim-pandoc plugins (I only use the base and syntax plugins). I would like to change the default bibliography style to a different .csl file so that when I run ...
0
votes
1answer
26 views

vimrc “col <cs>” works but vim complains about trailing characters; colors do not work when using “color” or “colorscheme”

Colors work when adding col elflord to my .vimrc file but vim complains about trailing characters col elflord. Changing the command to color elflord or colorscheme elflord gets rid of the complaint, ...
0
votes
1answer
32 views

Vim Color Scheme Overwritten by a Plugin

I’m trying to set up some prettier highlighting for Vdebug. I had a look at the source, and it says I need to target a DbgBreakptLine (I don’t know what they are called, but it’s the thing you put ...
0
votes
1answer
76 views

Vundle - Plugins installed but not loading

I've installed vundle on my ubuntu box but when I load vim none of the plugins load. My vimrc: runtime! debian.vim set nocompatible " be iMproved, required filetype off ...
1
vote
1answer
28 views

gvim: visual mode movement broken

This is probably a result of too many plugins but I can't figure out which one. So normally Vj or Vk in normal mode would highlight two lines. The behavior now is this: When V is pressed, the whole ...
0
votes
0answers
18 views

Gvim font loading issue

Possibly related: Gvim displays wrong font when set from _gvimrc, but correct font when set from menus I'm experimenting a weird behavior with gvim (under GNU/Linux) while trying to set up a specific ...