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

determine what changed the mapping of system command like dd - vim

This morning something, I suspect a function call, changed the mappings or actions for system commands like dd , e , j etc. dd moved horizontally, 'e' moved down a line and j and k moved horizontally ...
0
votes
2answers
43 views

Jumping to function in Vim

I have ctags and I would jump to functions by placing my curson to a function and pressing ctrl ]. However, I find this sometimes to be inconvenient. For instance, if my cursor is nowhere near a ...
0
votes
1answer
35 views

Vim `cpp` Syntax highlighter prematurely ends macros mid-word

FINAL EDIT: I have "manually migrated" this question to the new Vi(m) SE site: http://vi.stackexchange.com/q/2219/1060 My Vim syntax highlighter for ft=cpp is prematurely ending some macros ...
0
votes
0answers
78 views

gvim (version 7.4.52 and 7.4.622) doesn't refresh properly on Ubuntu (14.04 LTS)

The problem is happening on Ubuntu 14.04 LTS running Unity desktop under vmware on Windows 7 host. My gvim is sometimes not refreshing its display unless I force it to using Ctrl+L. For example, when ...
2
votes
3answers
138 views

Adding parenthesis around highlighted text in Vim

Is there a functionality in Vim that allows parenthesis to be added around the highlighted text? For instance, if I highlight n = getchar() in if (n = getchar() == '\n'), I would want to put ...
1
vote
0answers
103 views

VIM paste error: E353 nothing in register “”

I just installed Ubuntu 14.04 and got my vim set up and I have run into a slight caveat and I am not sure why it is happening. When I try to paste something with the middle mouse button, I get: ...
-3
votes
1answer
26 views

Configure command line look in Vim

Is it possible to change the default Vim command line look when you are in some buffer to see some valuable information? How? What Vim help page corresponds to these options?
4
votes
2answers
96 views

How can I get Syntastic to recognize newer Ruby syntax?

I'm using Syntastic in Vim, and it highlights newer Ruby syntax as errors. For example, if I use required keyword arguments (introduced in Ruby 2.1), like this: def distance(from:, to:) # whatever ...
0
votes
0answers
17 views

vim gets stuck at top or bottom

When I scroll to the top or bottom of a document using a pressed j and k, vim temporarily gets stuck (around one second) as if it has to finish clearing the keyboard buffer. Can I correct this issue ...
1
vote
1answer
116 views

How to “Edit with Vim” as administrator in Windows?

When you install gvim in Windows, you get a right-click Explorer context menu item: "Edit with Vim". Is there a way of either adding a "Edit with Vim as Administrator", or just changing the existing ...
0
votes
0answers
41 views

Can I get vim to install bundles and close in the background?

I've been playing around with Dockerfiles, and in setting up a development environment, there is one manual step I haven't been able to work around yet. To install the bundles in my vimrc, I have to ...
0
votes
1answer
21 views

Vim macro: increase last number of a line by 1

I have a csv file whose last column contains either integers, or the character "-". I need a vim macro that does the following: If last element of current row is "-": Turn "-" to "1" Else ...
1
vote
1answer
52 views

$HOME is not defined for root user on Ubuntu 14.04

On a fresh Ubuntu 14.04 install, the bash environment for the root user does not have $HOME defined. I need to run some apps from a root shell, for example: gdb /usr/sbin/apache2 This is difficult ...
1
vote
1answer
23 views

How can I create a macro to compile a CoffeeScript file I am editing from inside VIM?

I am writing a lot of CoffeeScript in VIM and I compile it very frequently by typing : coffee -c %. How can I easily create a macro so I don’t need to keep typing this?
2
votes
1answer
34 views

Can I make Vim's fold indicators visually subtler?

Fold indicators in vim are prominent because they take up the entire window width: void foo() { +--- 10 lines: int x;----------------------------------------------------------- } which makes ...
0
votes
2answers
88 views

Strange Vim/terminal use from ssh via Mac OSX

I am using terminal from a Mac OS X 10.10 (Yosemite) and SSH’ing into a fedora machine and am having a couple strange issues with the terminal: When I :q from vim, the contents of the vim screen is ...
2
votes
1answer
28 views

Check if vim is compiled with +X11 in .vimrc

I have two copies of vim installed. One is installed with macvim and necessarily configured with -X11 (to work with Cocoa), while the other is configured to +X11 (used in terminal, to work with a ...
0
votes
1answer
34 views

How to autocomplete python class in vim

In sublime text 3, if I'm editing a file.py and I type class it will automatically create this for me class ClassName(object): """docstring for ClassName""" def __init__(self, arg): ...
0
votes
0answers
17 views

Is it possible to restart the internal python in Vim?

I'm running custom python code in my vimrc and If I often find myself in the position where I'm editing modules used by the vimrc, which causes script failures until I restart vim and its internal ...
0
votes
1answer
24 views

vim find buffer by absolute path

How can I find a buffer in vimscript when I have an absolute path, and as you know vim buffer names can be relative path? Is there a function for that?
9
votes
3answers
1k views

Why does the system have /etc/sudoers.d? How should I edit it?

Last time, I asked about the risk of these (in /etc/sudoers): user_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf %group_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf ...
1
vote
2answers
79 views

Open the output of a shell command in a split pane

I'm quite new to vim, so sorry, if the question is stupid. Consider any interpreted programming language. I can run the currently opened script using ! interpreter %, and use the return key to ...
2
votes
1answer
57 views

MacVim / Vim retain content of all buffers (like Sublime Text). Preserve swap?

TL;DR: Can Vim store its swap files, and loads the same set of swap files and buffers on load every time? I'm on a Mac (OS: Maverick), where a number of application keeps the data in some sort of ...
0
votes
1answer
38 views

How to permanently correct syntax highlighting after “?>”?

In Vim, I have a PHP script that contains a line similar to the following: $return = "<?xml attributes=\"values\" ?>"; Normally, the ?> characters will close an opening <?php tag, ...
0
votes
0answers
17 views

Can vim/gvim show “self” when editing a Ruby file?

When editing Ruby files in gvim, I'd like to be able to see which Ruby context the cursor is in. For example, if I have a file with several nested modules and classes, I want to be able to see what ...
0
votes
1answer
28 views

Confusing end of line characters in Vim

How to view in Vim if there is any end of line character at the end of the file? If file content is '1234' as by echo -n 1234 > file.txt Vim shows (with :set list option) '1234$'. If file content ...
0
votes
1answer
26 views

Case insensitive search with accents

How can I tell Vim to search for a certain pattern in a case insensitive way taking into account also characters with accents? For example I would like to have /ü match both the capital U in Über and ...
0
votes
0answers
47 views

Vim colorscheme not displaying properly

I realize that questions about Vim colorschemes have been asked quite frequently, but I believe I've tried the advice in all of them and I can't quite seem to get my colorschemes to work. That being ...
0
votes
1answer
38 views

Vim: Managing multiple wording alternatives

(After reading this, please suggest another wording for the question, because I couldn't come up with a better one) When writing and editing in Vim, whether texts for humans or texts for humans and ...
0
votes
2answers
58 views

Turn off vim's `filetype indent` for a specific filetype

In my .vimrc I have filetype indent on Now, the way it attempts to auto-indent yaml files is very confusing for me, so I want to turn filetype indent off, but only for yaml files, not for other ...
0
votes
1answer
62 views

The risk of vim -Z (rvim)

Last time I asked about the way to prevent risks caused by these configurations: user_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf or %group_name ALL=(ALL) /usr/bin/vim ...
0
votes
0answers
46 views

Why doesn't Ctrl+[ (control + left bracket) work in GVim on Windows 8?

I'm on a macbook pro with a bootcamp partition running Windows 8.1. This problem also occurs on my PC with Windows 8.1 as well. In GVim, pressing Ctrl + [ should be equivalent to Esc but it does not ...
-3
votes
1answer
44 views

Set nano as a default editor over Vim [duplicate]

Every time I login to ssh terminal to edit files I execute the command export EDITOR=nano How Could I set nano as default editor so I shouldn't execute this command anymore
0
votes
1answer
17 views

Scrolling through results of vim's silversearcher plug in

When I use :Ag "pattern" Let's say it finds 5 results and to scroll through them I use "cn" but it opens each one I scroll through in the buffer. Is there a way to open just the one I scroll to and ...
0
votes
0answers
21 views

Bind Unite to <C-p> in vim

I love vim, and I personally think that CtrlP's trick of binding to <C-p> only when I'm not using it to yank-pop is awesome. Is there any way I can do this my self with Unite? Specifically: ...
1
vote
1answer
70 views

tmux printing u'0x001b' and “]112” randomly

So I've lived with this problem for several weeks now, hoping that if I just let it happen enough, I would figure out the underlying trigger. No luck. tmux in bash in gnome-terminal in XMonad on ...
0
votes
1answer
33 views

How can i insert a tab after choosing a proposed completion in vim

I thought I knew the answer to this. I used to do <C-V> tab as suggested in "How to insert a real tab with Vim SuperTab plugin if completion fails" and many others. If i set list though, I can ...
2
votes
4answers
80 views

Vim copy/paste messing up indentaton

Whenever I copy something from another application and then go to paste it into vim, it messes up the indentation. For example, just now I tried to copy the manifest.json file from the hello-world ...
0
votes
2answers
68 views

How to run a grep in vim asynchronously?

I am using Vim in my development. Also using :vimgrep to search for text in files within Vim. But while vimgrep is searching, I can't do anything inside Vim until it finishes. A long time ago, I saw ...
3
votes
0answers
95 views

How to prevent security flows caused by sudo vim? [closed]

I learned doing sudo vim causes security problems. For example, user_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf or %group_name ALL=(ALL) /usr/bin/vim ...
1
vote
0answers
29 views

Console window needs to be resized before launching VIM in SSH session [closed]

So I installed git-scm and am using the bundled cygwin ssh (as far as I can tell) program that comes with it. The maximum height of my VIM window is limited to the height of my console window PRIOR to ...
0
votes
2answers
31 views

vim. ensure each buffer is mapped to 1 tab and always showing

So I want vim to behave like a "standard" text editor where whatever buffers are open will always map to a tab, and that tab only shows 1 buffer only. This is like say sublime text, where any open ...
0
votes
0answers
50 views

Theme problems with vim and terminal

everyone. Trying to figure out a weird problem I'm having with VIM, that's probably just me being a complete novice with the program. I started using it today, and was told to use Vundle to manage ...
1
vote
1answer
91 views

ConEmu: Open files in vim with ConEmu through File Explorer

Is it possible to open files by double clicking an associated file extension or through context menu with vim in a ConEmu tab?
-1
votes
1answer
48 views

VIM Vex select file to current split

When you use :Vex /dir It shows all the files. How do I open the file in the vertical split thats open for me? The answers here all assume vim is closed or demonstrate how to open the split view ...
0
votes
1answer
36 views

Vim quicklist entities at line containing tabs

I make a quick list in vim in my python plugin. It fails to position cursor in a proper place when there is tabs in a line in a very unpredictable way. For example, there is a line like this in a ...
1
vote
1answer
36 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
2answers
101 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 ...
0
votes
1answer
66 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?
1
vote
0answers
116 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 ...