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

Scroll up command history in Vim without using function key

I recently bought HHKB (Happy Hacking KeyBoard), and it doesn't have direction keys -- it's through Fn + ;'[/ to achieve direction key. Therefore, I'm trying to avoid using direction key as much as ...
1
vote
1answer
26 views

How does one append to the clipboard register in vim?

I already know that you can copy something the a register using: (plus a yank, delete, etc. command) "a I also understand that you can append to the a register using: "A In addition I understand ...
0
votes
0answers
27 views

Place pagebreaks in vim

How would I place pagebreaks in vim (equivalent to match printing specifications to a white xerox paper of 8.5 x 11 in size)? This is so that I don't have to manually adjust the lines to match how ...
0
votes
1answer
17 views

Plugin for searching for text within all files in a VIM “project” [on hold]

I find using grep within VIM to be extremely clunky and unnecessarily difficult, especially when trying to find within a set of files. One of my favorite plugins, CtrlSpace has the concept of a ...
2
votes
2answers
25 views

Get rid of null character in vim variable?

I'm trying to fix vim's Backspace behavior on one of the platforms I use. I got the name of this platform (call it bad_platform) from the system's get_platform command. Following the advice in :help ...
0
votes
1answer
12 views

opening NERDTree to point to my file but with full directory tree

I'm using vim, cscope and NERDTree and I cannot find how to open NERDTree to be pointing to specific file (one that is an active buffer) but to have root directory equal to directory from which I ...
1
vote
1answer
19 views

Did I accidentally corrupt the filesystem using VIM and Netrw?

I am using Mac OS X. I accidentally did the following: vim /path/to/directory I meant to open a file, but instead I opened a directory. VIM was excessively helpful, so it opened Netrw. I did not ...
0
votes
1answer
15 views

When vim-ing a folder, how do I make a new file?

I looked around a bit and couldn't find anything on this, but here's the scenario: I vim a folder, to see what's up. I navigate to another folder via j/k/arrow keys/whatever and hit enter I realize ...
1
vote
0answers
12 views

Vim: is it possible to add a modeline for :syntax sync fromstart in a file?

I'm writing a really long page to document a compiler and I was thinking that it would be nice if the doxygen highlighting would stick around. Only if I do a search to further down the file, it loses ...
0
votes
2answers
31 views

Move cursor from the beginning of a highlight to end of highlight

I have the following sentence: I want to add api restriction to MsrestHandler and RESTHandler. ~ (~ indicates the cursor position) I want to change MsrestHandler to MsRESTHandler. Because ...
0
votes
2answers
17 views

How to efficiently delete the first N characters in each line in a paragraph without using visual mode in Vim?

In vim, is it possible to delete the first N characters in each line in a paragraph without using visual mode or using dot command multiple times? Convert www.some_website.com www.some_webiste2.com ...
0
votes
0answers
16 views

vim syntax highlight export to HTML ignores highlighted search results

I would like to export highlighted code from vim to HTML including highlighted search results. Using :TOhtml works fine, however it omits the search highlights. So, how can I export the highlighted ...
0
votes
0answers
28 views

Scrolling with trackpad/mouse in screen on OS X Terminal

I use screen command on Terminal on OS X. When I want to scroll up I change the mode to Copy Mode by pressing Ctrl A Esc. Then I use my trackpad to scroll up/down. It works. However, sometimes ...
0
votes
0answers
8 views

How to install vim-pandoc plugin on Windows (s:python.cmd . import vim_pandoc.bib.vim_completer)

I installed vim-pandoc into a recent install of Vim on Windows 8.1. When I open a Pandoc markdown file (that I made with Sublime Text 3) I get the following messages. This occurs whether or not I ...
0
votes
0answers
20 views

Vim: use tab key for autocompletion with Autocomplpop plugin

I'm using basic autocompletion in Vim along with the Autocomplpop plugin, which automatically shows available completions when I start typing. Once I've typed enough to narrow down the list to the ...
0
votes
1answer
19 views

Kompozer and bootstrap

I am hoping to write my first webpage in bootstrap and, in the past, I have done this using only commandline (vim) and then seeing how it looked in a browser, but I know this is rather archaic and I ...
0
votes
0answers
10 views

vim: virtual edit doesn't extend past last line in file

I have the following in my vimrc set ve=all. When I want to move my cursor past the last line of the file, I cannot. Virtual edit seems to disallow motion past the last line. Is this just a ...
-1
votes
0answers
24 views

bash does not recognize syntax or filetype command from .vimrc on Mac 10.10.3

I am running OS 10.10.3, and when I add syntax on or filetype plugin indent on into my ~/.vimrc, i get: [ross@RossMac pic]$ source ~/.vimrc -bash: filetype: command not found -bash: syntax: ...
-1
votes
0answers
13 views

Square “separators” in vim-airline?

So, I just installed vim-airline as part of a set of packages on my Linux Mint 17.1 machine, and I'm getting some weird behavior with my setup. I know that the separators between the sections of ...
0
votes
0answers
17 views

Links browser and Vim together

I've been reading bloomberg.com/whatiscode and its a long webpage. I also recently started using Vim. At the moment, to take notes, I copy paste some parts of the webpage onto a text file. I would ...
0
votes
1answer
20 views

Extend vim's syntax highlighting for only *some* files?

Our software has many .xml configuration files. Vim colors these files, using e.g. /usr/share/vim/vim74/syntax/xml.vim. But can we customize the coloring for just these files, and not for all .xml ...
0
votes
2answers
23 views

vim/gvim command line switches?

I've just spent 1/2 hour trying to find a list of command line switches for vim. Since vim is a "command line editor" a search on "vim command line ..." is not very useful. I got curious trying to ...
0
votes
1answer
20 views

Vim disable the display of accents in latex file

I have a problem when writing with vim in a .tex file. When I type, for example : \`e I automatically get : è Which I would like to disable, because it is really annoying when writing, the ...
0
votes
1answer
7 views

Vim let cursor sit on newline

Is there a way to let the cursor sit on a newline in Vim, similarly to the default behavior of Emacs? When you delete a character in the middle of a line, the character gets removed and the cursor ...
0
votes
1answer
22 views

Tear off tabs in GVIM just like chrome or firefox

Is there a way to move tabs to a different instance of GVIM? I'm looking for something similar to how most web browsers function. When you drag a tab out of its current window, it either creates a new ...
1
vote
1answer
37 views

Vim prompting file has changed after git pull

My work flow involves editing many files in vim, and occasionally I will do a git pull --rebase, which may or may not actually change the files I am editing. However, after such a rebase, vim will ...
0
votes
0answers
12 views

Scroll when vim displays too much text

If you enter :function in vim, a bunch of text scrolls past the screen. Is there any way to look through it? I don't care about the specific output of :function.
0
votes
1answer
7 views

How do I go to top window in NERDTree for Macvim?

I've googled around a lot but I can't seem to find the solution for this. I want to switch to upper or bottom window using shortcut. Currently, I'm using Ctrl+w w but the command is switching around ...
0
votes
2answers
45 views

Apply full vim colorization for bash scripts that have no shebang line

So in my project there are many bash script files that are sourced, but never run directly, so they get no shebang line and no execute bit set. Vim colors them a little bit, but doesn't use the full ...
2
votes
1answer
28 views

How to give count to a Vim command line command (like :insert, :normal, etc)

In Vim as probably all of you know it is possible to give a count to commands in "normal mode" by preceding them with a number. Like for example 4dd that will delete 4 lines. I am wondering if there ...
0
votes
1answer
32 views

Vim in xterm : Mouse cursor not changing based on mouse mode

When I use vim with gnome-terminal or yakuake, and I have mouse on ( set mouse+=a ), then I see an arrow as mouse pointer, and when I have mouse off, then the "insert" sign as mouse pointer. However, ...
0
votes
1answer
25 views

Can I “properly” run a vimscript in the background?

I'd like to run a peice of vim script in the background (preferably on windows, although if it only works on *nix, that's ok too) The idea would be the following: User calls vimscript function ...
1
vote
0answers
15 views

How to get par formatter to not mangle paragraphs with non-space character prefixes, suffixes?

I can't get the par formatter to do what I want, specifically with automated prefixes and suffixes. Details: My .vimrc excerpt: set formatprg=par\ -w72reqh map t gqip This example input-to-par ...
0
votes
0answers
26 views

Special characters are not displayed in terminal and vim

I'm using redhat release 5.6 (Tikanga). Recently I installed a patched font that support some special characters. I'll describe what I did. Installed the font in the ~/.fonts directory Run fc-cache ...
1
vote
1answer
21 views

Get vim to ignore conversion errors when reading file

I have a UTF-16 file with a BOM. I've set fileencodings to: set fencs=ucs-bom,utf-16le,utf-8,default,latin1 However because of one character on one line, vim does not auto-detect UTF-16 and ...
1
vote
1answer
32 views

Display trailing spaces in vim

I would like to have a nice and sweet display of trailing white-space in my terminal vim. This would allow me to remove them before closing the file. I am aware that this question is quite popular ...
0
votes
0answers
11 views

vim Repeatable Motion that Distinguishes Vertical and Horizontal

I've been looking for a plugin like repmo that can repeat my previous horizontal movement and previous vertical movement separately, and reverse the direction of the motion. (e.g. 5j could be repeated ...
1
vote
1answer
26 views

Vim NERDTree | Remap '<cr>' to 'go' | open file but remain in NerdTree window

I'm trying to remap Nerdtree keys so that <cr> opens a file but the cursor stays in the nerdtree window. Nerdtree has this capability by default and can be triggered with the g + o key mapping. ...
1
vote
1answer
45 views

How can I add a fixed amount of time to all “hh:mm” strings in a document?

I have a document that's a transcription of a video interview. The video itself has embedded SMPTE timecode as well as burnt-in timecode (BITC). The SMPTE timecode and BITC correspond to the time of ...
0
votes
1answer
33 views

How would I write this VIM command for `sed`?

I have a .csv with special characters that are wrecking an import I need to do. In VIM, I discovered away to remove the special characters with : :%s/\r//g This removes ^M from some of my broken ...
1
vote
2answers
33 views

Vimserver on Cygwin

Following to this question, I discovered that I can use --servername <name> and --remote on my console vim executable under Cygwin. So I installed vim-common vim and gvim and I do not have ...
0
votes
1answer
19 views

Vim mapping characters in insert mode

OK this may be pretty basic question but I just learned how to make custom key mappings. I am trying to make vim automatically "end" two lines lower when typing "class" so I wrote following in ...
0
votes
1answer
33 views

Command with localleader in gVim

I'm giving gVim a try, among others because it has a neat plugin for todo.txt. That nice plugin in it's readme description demonstrates its usage by saying to do x you should <localleader>x. ...
0
votes
1answer
29 views

How does vim know to syntax-color .hgrc?

With syntax on, vim syntax-highlights my ~/.hgrc file. How does vim recognize this file? How can I get vim to apply the same syntax coloring to a differently-named file?
0
votes
1answer
58 views

Configuring function keys in PuTTY for both Vim and Midnight Commander under tmux?

First off, I'm aware that I can use Alt+1 (through 9 and 0) to synthesize the respective function keys (F1 through F10) in Midnight Commander. It has helped me many times, but by default I still press ...
1
vote
1answer
39 views

How to set cursor to after last character in vim?

Why can't I insert at the end of a line in vim if there's no whitespace at the end? Let's take for example my SSH config file: I try to use $, l, e, but I can't seem to get to the end of the word. ...
1
vote
2answers
68 views

Best way to increment numbers in one line in Linux [closed]

I have one line with lot of entries among which is also time. ('DEFAULT',17,NULL,'2014-07-14 10:30:00','Something','2014-07-14 06:30:00',1),('DEFAULT',26,NULL,'2014-07-14 ...
1
vote
1answer
49 views

Color scheme(s) in Vim not properly working

On Archlinux, using Vim 7.4 (installed with pacman), I tried to use the lucius color scheme. However, the moment I turned it on, all color went away. This happened in the Xfce Terminal emulator under ...
1
vote
1answer
50 views

Pathogen - only some of vim plugins work

So recently I installed Pathogen along with a few plugins like NerdTree, and Solarized and they both work really well. Today I tried to install Ruby indentation plugin ...
0
votes
2answers
36 views

How to reload a bak of etc/apache2/httpd.conf in terminal after bad changes made with Vim?

I changed the apache2/httpd.conf through vim in Terminal OS X yosémite as Su and quit saving changes. But in browser, the localhost sent the 403 Forbidden message "you don't have permission access to ...