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

Getting CTRL+V to work in Vim inside Conemu

Conemu uses CTRL+V as the short cut to “paste first line of clipboad.” I want this functionality when I’m interacting with the command-line, but when I’m in Vim I’d like Vim to handle it.
0
votes
0answers
19 views

after SSHing into another machine and starting vim, run terminal command in original terminal

I use ssh to remotely login to a machine where I subsequently work primarily from Vim. Sometimes I want to run some shell command on my original machine without leaving Vim. What is a non-disruptive ...
3
votes
0answers
29 views

How to provide user “hints” to “diff”? [on hold]

Sometimes, when I am diffing two text files (usually in vimdiff), the diff algorithm gets confused and associates the wrong lines with one another. Once that's happened, the rest of the diff is often ...
0
votes
3answers
29 views

VIM How Can I Force VIM to Arrange Words According to My Choice?

Well I am writing and learning. I just want to write some text in this way.... - First line. Second line. Third line. But the problem is the lines are starting in this way... - First line. ...
0
votes
3answers
35 views

How to concatenate pairs of cells; every second cell to the first

How to concatenate successive pairs of cells in a column, adding the second cell of each pair to the first. For example: santhosh kumar sagar sv sai deva And the result should be: santhoshkumar ...
-1
votes
0answers
8 views

Tmux 1.9a - variable #{pane_current_command} doesn't work as expected

I'm trying to get vim-tmux-navigator to work on my my Cygwin (Win7 x64) + Tmux 1.9a but it doesn't. The reason is the variable #{pane_current_command} always returns bash instead of vim, so the ...
0
votes
0answers
13 views

Mouse works erratically/intermittently over remote SSH

I work remotely sometimes. I’ll use Vim inside a Screen session, over SSH. I use the mouse in Vim. Sometimes the mouse breaks. One of these things happens: Random characters get inserted into my ...
1
vote
0answers
15 views

vim leaves a swapfile after crash with unknown owner

I am running Cygwin on windows. Several times now I've had a swap file left behind from vim after a crash, but it can't be recovered or deleted. "ls -l" shows this: -rw-r----- 1 Unknown+User ...
0
votes
0answers
11 views

Mouse click only works once with iterm2/tmux/mosh

I'm trying to set up iTerm2 + mosh + tmux to do my remote work. I can get everything to connect up, but for some reason, the mouse response is funky. If I split my tmux window so I have two panes and ...
1
vote
2answers
21 views

how to set .vim color scheme to vim editor OS X

I downloaded some .vim color scheme files in github and moved them by sudo mv ~.vim /usr/share/vim/vim73/colors then I wrote colorscheme ~.vim in vimrc. The original schemes already existed, are ...
1
vote
2answers
29 views

Make :Wq equivalent to :wq in vim

I'm always typing :Wq when I mean :wq. Is there a way to alias :Wq=':wq' in vim?
-1
votes
0answers
16 views

Is there a plugin for VIM to popup the html in a Browser quickly? [closed]

Is there a plugin for VIM to popup the HTML in a browser quickly? If there is a similar thing for cygwin, that would be useful too.
0
votes
3answers
48 views

Installing a vim color scheme

After some research, I've discovered that in order to properly install you need to create a .vim directory inside of the path represented by the $VIMRUNTIME variable from this StackOverflow post. When ...
0
votes
0answers
20 views

gnu screen not to change my window titles

I set meaningful names to new windows I create in gnu screen, but then when I 'cd' or open vim that name gets changed to 'pwd' for instance. Is there a way to prevent screen from changing the title? I ...
0
votes
0answers
14 views

Jedi vim autocomplete fails

After installing jedi-vim with Pathogen, I noticed that several features weren't working correctly. To test the behavior of jedi-vim, I copied the 2nd code snippet featured in the demo at the demo for ...
1
vote
2answers
33 views

Vim Avoid “Hit the enter key or enter a command”

I have the following configuration in my .vimrc file to switch between a .c File and it's corresponding .h File function SwitchHeader() w if(&ft=='cpp') e %:r.c ...
0
votes
1answer
34 views

Scroll in terminal while Vim is running

When I open vim in some terminals (on mac for example) and use the mouse scroll, I am able to see the terminal output again. If my terminal window would look like this: user@pc$ "I'm gonna start ...
2
votes
1answer
21 views

Effectively manage sets of Vim settings

Is there any effective way to manage multiple sets of Vim configuration? I need this because I need different sets of configuration for different types of work. It depends a lot whether I'm writing a ...
0
votes
1answer
27 views

How to I map “Ctrl + g” to open NerdTree

I use vim at work, but we have an IT guy who installed a bunch of magical plugins for vim on my work laptop so that now when I try to open vim on my home laptop, I am completely lost because I don't ...
0
votes
0answers
16 views

saving/:w a python file in gvim is creating two of the same files with different extensions [duplicate]

When I first :w test.py My file saves on my desktop with a picture of a python script and the file type is shown as Python File. Now when I go to save my file without including the name as in :w a ...
0
votes
1answer
25 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
33 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
26 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
51 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
120 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
43 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
25 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?
2
votes
1answer
28 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
16 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
68 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
14 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
19 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
38 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
21 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
33 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
57 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
18 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
30 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
15 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
15 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
802 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
45 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
41 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
37 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
26 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
22 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
37 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
36 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
50 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 ...