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

In Vim, netrw mistakenly thinks file.py is a directory

Using netrw in Vim, I navigate to a Python script I want to edit (file.py), but most of the time it is listed as "file.py/" with a slash, indicating it is a directory. This is impossible to open. If I ...
0
votes
0answers
7 views

Make GVim (or any program) always run as current user

So after finding out that running GVim as root was the cause of my last problem, I need to know how to make GVim always run as my current user. I can do this using gksudo -u myUser -l "gvim", but is ...
0
votes
1answer
10 views

VIM Sendscreen and behind the scenes buffer

I'm currently using vim via cygwin in conjunction with screen and screen-vim. Screen-vim has SendScreen which takes the entire current buffer and sends it to the attached screen. While this is nice, ...
0
votes
1answer
14 views

Vim from terminal can locate package, GVim cannot

So I've been installing Syntastic and JSHint for some Vim JavaScript syntax checking. which jshint returns /home/myUser/local/bin/jshint which vim and which gvim return /usr/bin/vim and ...
0
votes
1answer
22 views

Is it possible to differentiate between a scratch buffer and a new [no name] buffer?

I would like to know if there is a command I can run in vim to tell whether a particular window that has focus is actually a Scratch buffer or an empty buffer (such as when creating a new buffer that ...
0
votes
2answers
15 views

Making Shift-Tab work in Vim when running inside ConEmu

I have these mappings in my initialization files for Vim: nnoremap <S-Tab> <LT><LT> vnoremap <S-Tab> <LT>gv the intention is to be able to unindent with SHIFT-TAB. ...
0
votes
1answer
22 views

How to choose the suggestion from suggestion list

I'm using neocomplete plugin for vim. I can't figure out how to choose the suggestion from the list. What is the meaning of letters [B] and [S]? How I can use them to select suggestion?
2
votes
2answers
193 views

Why does the 'vi' command open 'vim' editor?

I am using Ubuntu 12.04. Not that I am complaining as I like my vim and prefer its many features. However, I’m curious as to why it does it. It is not aliased in .bashrc or .bash_profile. I am not ...
0
votes
0answers
7 views

Latex: customising syntax highlighting in vim

I made some custom commands to make writing equation blocks easier: % Equation starters \newcommand{\eqn}[1]{\begin{equation} #1 \end{equation}} \newcommand{\eqns}[1]{\begin{equation*} #1 ...
1
vote
1answer
13 views

Editing gcode with vim regex

I need to edit gcode for a model in particular I have to substract number 87 from all Z coordinates. Here is sample of gcode: ;LAYER:435 G0 F9000 X-38.420 Y-26.887 Z87.300 ;TYPE:WALL-INNER G1 F1800 ...
1
vote
1answer
26 views

Vim: cannot remap <leader> to comma or space

I've tried let mapleader = '<space>' let mapleader = ' ' let mapleader = ',' None of them works. VIM doesn't even show coma in the status bar (bottom of the screen?), but it works perfectly ...
0
votes
1answer
22 views

Wordskip in vim [ssh from mac to linux]

Word skip (ctrl key and arrow keys) work fine with vim on my mac in terminal. But, when I ssh from my mac to my linux box, ctrl and arrow key do not work (wordskip) instead delete a bunch of lines ! ...
0
votes
0answers
35 views

Developing big projects with Vim [closed]

Can anyone please share your experiences, tips and workflows that could be usefull for developing big projects with Vim? Is there a way of doing this without installing 20 different plugins. What ...
2
votes
2answers
135 views

How to recreate a file with VIM?

I have myfile.txt with some text. If I type vim myfile.txt it opens the file. Is there some parameter for vim to delete the old file and create an empty new one? For example vim -recreate myfile.txt ...
1
vote
1answer
14 views

How to bind a key to issue two commands in visual mode?

This question is more general than the problem I am currently faced with, and may not have a solution. But my real problem may have a solution if there is no general solution. What I want to do is if ...
0
votes
1answer
20 views

Can I make Vim filter entered ex commands?

I know that this is probably better to solve by not typing sloppily in the first place, but I just think it would be really nice to have. Since I've used Vim for a while, the ;w (I have mapped ...
1
vote
2answers
38 views

Write to two applications at the same time

Is it possible to type on your keyboard and have it write in two different applications at the same time? I would like to write in Vim and another application which gives me intellisense (smart ...
1
vote
1answer
17 views

difficulty opening a file(man page) with funny characters in gVIM

I did man ssh_config>a from cygwin I generated the file I want to print $ man ssh_config >a I then opened it in gvim as you see from the screenshot. I might join many of the lines (vim's J) ...
0
votes
1answer
20 views

Vim inserting white spaces after accentuations and other special characters on Mac

If I write the following text on vim: Tís teçxt contãins spécial charàctérs I will get: Tí s teç xt contã ins spé cial cha?| cté rs This wasn't happening before, when I had Mountain Lion. I've ...
1
vote
1answer
50 views

Apply a count to a mapped command

I want to join every four lines of a file into a single line. I can do this by typing: JJJj Since I am going to do that repeatedly, I mapped it to a key: map <F5> JJJj Now, I can hold down ...
0
votes
1answer
40 views

How do I define a vim function on a single line?

Since | is used to separate commands, I thought I could just do this: :function! SomeFunc() | return 0 | endfunction It works fine when I type it on separate lines (entering the first line causes ...
0
votes
0answers
29 views

Forward slash got mapped to Oo in vim

I dont know how but forward slash is mapped to Oo(behavior similar to Shift-o o in normal mode) in vim hence I cannot search. I tried to start vim with --noplugin but the problem still persists. The ...
1
vote
1answer
54 views

In VIM, how do you delete to end of line while in command mode :?

While in VIM, I have a leader shortcut for the following: :!git commit % -m 'updated '; git push; ...
0
votes
0answers
36 views

How to prevent terminal bell from going off when exiting vim from within a nested screen session

My vimrc file contains the following lines to set the window title start and end strings respectively. When I enter a vim session and my konsole terminal is either outside of screen or within a ...
1
vote
3answers
32 views

Notepad++/other editors: How to view same file in multiple columns with auto scrolling?

Is there any editor that allows me to have two columns, where the second column picks up after the last line of the first column? I don't mean cloning like in Notepad++ where I have two open copies of ...
1
vote
1answer
36 views

How to set Vim inside Tmux as default system editor? (Linux)

At all times I have Tmux running, with Vim inside it. I want text files to be by default opened in that Vim instance, and not a new one. I presume I need to somehow change the default text editor as ...
0
votes
1answer
23 views

How to separate Vim themes for LUI and GUI with same general configuration?

I like twilight theme for my Vim, but this theme has 2 major versions, twilight256.vim dedicated for terminals and twilight.vim designed for graphical interfaces. I just wondering how to separate ...
0
votes
1answer
18 views

Scripting a precompiled Vim with Python, Perl… — are the DLLs all I need?

Assume I download a precompiled Vim (all required settings are enabled) on Windows. Now, I want to script it using Python, Perl, and whatever else Vim supports. Are the DLLs all I'm going to need (for ...
1
vote
2answers
38 views

creating a simple vim syntax highlighting

i have a simple sort of a database file which consists only of entries in the following format variable=value i want to create a simple vim syntax highlighting for it and set it for specific ...
1
vote
1answer
28 views

YouCompleteMe set flags for filetype

let g:syntastic_c_compiler = 'clang' let g:syntastic_c_compiler_options = ' -ansi -pedantic' let g:syntastic_cpp_compiler = 'clang++' let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++ ...
1
vote
1answer
38 views

Setting Vim key bindings for the MySQL client

I add these following lines to ~/.inputrc and now the Postgres client, psql, uses Vim keybindings. set keymap vi set editing-mode vi However, this does not work for MySQL. I understand that MySQL ...
0
votes
2answers
39 views

Vim: how to perform this task every time I open a file?

For a time I have one vim configuration on my laptop and another on my desktop, so when I edited filed on my Dropbox between the two I would end up with format issues. Specifically, I had ...
2
votes
2answers
51 views

Sort structures in file [duplicate]

For example I have file consisting of structures like name = { foo = bar; ... }; So in file there are lots of structures like this. How can I sort them (I'm using vim but emacs is surely ok ...
0
votes
2answers
27 views

I have a windows ssh host (freeSSHd). How do i get 256 colorschemes to work in vim when connecting through putty?

What I'm trying to accomplish is to putty onto my windows host, and then use vim with full color functionality. How is that possible? I'm currently using freeSSHd but I'm willing to change to whatever ...
0
votes
1answer
32 views

vim: having tabs in a single viewport

I would like to have two viewports, one with Nerdtree and the other with tabs of the files I'm editing. Is this possible? Whenever I try to split and then opening tabs I get one tab with 2 viewports ...
1
vote
1answer
41 views

How To Search for multiple multi-word strings in vim?

For example I'm trying to search for the occurence of both hello world and goodbye world in the same line. I've tried a bunch of difference iterations. For example, if you want to find one multi-word ...
2
votes
1answer
27 views

Unintentional vi mode in iTerm on Mac?

I occasionally find that while working in iTerm the default Readline key bindings are replaced with the vi keybindings. For example, I will try to go to the beginning of the line with ctrl-a, and ...
0
votes
1answer
18 views

VIM substitute environment path to get include path

I want to build an include path from a environment variable on vim. I want to keep only the instances which ends as /share/bin on this variable, and change them to include. I want to do this on ...
2
votes
1answer
35 views

How to include all Vim config files in some folder?

I want to reorganization my vim directory to be like this: - dotfiles |- vim | |- config | | |- global | | | |- basic.vim | | | |... | | |- plugins | | | |- ctrl-p.vim | ...
0
votes
1answer
31 views

Vim makeprg with multiple commands (cd + make)

I want vim to run makeprg with two commands, namely: cd\ cmt;make; but when I do so, it get stuck on the make command. To clarify, when I mean get stuck, I mean that it ends compilation but it ...
0
votes
1answer
15 views

vim: Mapping from .vimrc not applied

In my vimrc, i mapped nnoremap <tab> >> and nnoremap <s-tab> <<. The second mapping works fine, the first one however seems to be forgotten. If i map it manually when in vim, ...
0
votes
0answers
27 views

in vim, making files added to quickfix menu with cexpr command navigable

I'd like to be able to show all of the files from a Git commit in a vim quickfix menu. I can do this with this command: :cexpr system('git diff-tree --no-commit-id --name-only -r a44fcf896') (The ...
0
votes
0answers
21 views

Vim not loading ftplugins files

I added java_getset.vim as ~/.vim/ftplugins/java_getset.vim, but when I run :scriptnames I don't see it listed. I pared my .vimrc file down to: set nocompatible filetype plugin on to remove ...
0
votes
0answers
83 views

Ubuntu 14.10, Compiled or Installed vim-gnome, doesn't paste from stopped vim

I just compiled vim with many many different ways and I can't get it working properly on Ubuntu 14.10. this is my configure: ./configure \ --enable-pythoninterp \ --enable-cscope \ ...
0
votes
1answer
29 views

In vim, don't store {} motions in jumplist

I find myself using vim's { and } motions frequently, to jump to the next/previous empty line. But those motions are captured in the jumplist, which makes the jumplist less useful because it's full of ...
0
votes
1answer
31 views

Make vim's {} motions skip over folds

I love vim's { and } motions, which jump to the next/previous empty line. I've recently been using folding more, and while that's a great feature, it doesn't do what I would expect with respect to ...
0
votes
0answers
18 views

Hide buffers not tied to a file from bnext/bprev buffer list

I love VIM buffers and do use :bnext and :bprev to navigate my buffer list. I even have mapped them to <tab> when in normal mode. Simple and convenient: " Maping next/prev buffer to <TAB> ...
1
vote
1answer
31 views

preventing vim from destroying screen's scrollback buffer

when not using gnu screen, vim exits without littering my scroll back buffer. It vanishes, and all i get is a new bash prompt. everything that was on the screen before starting vim is there. when its ...
0
votes
3answers
63 views

mapping jj to escape in macvim works but not in terminal vim

In my vimrc I have: inoremap jj <ESC> Using the latest macvim I can hit jj and i'll jump from insert to command mode, but using the same vimrc with just regular vim in iterm2 it just inserts ...
0
votes
1answer
24 views

Unexpected behaviour in vim solarized with urxvt

I get the following garbage characters as @k displayed in vim when using solarized in urxvt. However when i resize the window the issue disappears. note that I am using i3wm as my window manager. My ...