Tagged Questions

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
7 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
26 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
29 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
48 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
19 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
29 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
37 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
20 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
17 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
30 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 | ...
1
vote
0answers
25 views

delimitMate's expand_cr doesn't work

delimitMate has a setting expand_cr which put a new line after <CR> is pressed. But it doesn't work for me. I've found that the problem is already mapped by different plugin which probably is ...
0
votes
1answer
19 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
13 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
20 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 ...
2
votes
0answers
41 views

Vim + TMUX duplicate status line

I've recently started using Vim in conjunction with TMUX and have been slowly making them work together. I ended up with the background colour problem and fixed it by setting making the Vim terminal ...
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
51 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
30 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
17 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
25 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
52 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
15 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 ...
-1
votes
0answers
30 views

Brown Colors in Solarized Dark Vim Terminal

Can you please take a look at my screenshot and help me to understand how these colors of brown are in my solarized dark theme for Vim in the terminal? Using iTerm2 with 256 set and vim-airline, if ...
0
votes
1answer
21 views

Cannot copy from Vim under Tmux into clipboard using "+p on Ubuntu

I'm using zsh, tmux, and Vim and for some reasons recently, I've noticed I cannot copy from Vim to X clipboard under tmux using "+y. Any idea how I can troubleshoot this issue? It used to work before. ...
0
votes
0answers
24 views

Can't get vim to display colorschemes right

After reading everything that I could find form google... I still don't have a solution. OS: Arch Linux Terminal: rxvt-unicode The output of command: tput colors is 256 (Shown in the image ...
1
vote
1answer
12 views

how to search long_word under cursor in vim

I know you can search word under cursor in VIM by # and *, but that search does not work for something like 'long_word', e.g., if my cursor is as 'l|ong_word', then I search by # or *, word like ...
0
votes
1answer
31 views

cygwin: vim in mc not coloring

I have a setup using cygwin with midnight commander and vim. I have a proper .vimrc in my home folder, which works fine if I start up vim directly on the console. Now I also want mc to use vim, so I ...
0
votes
1answer
11 views

Vim syntax highlighting problems with Haskell

Normally vim is very good with syntax highlighting, it hasn't given me any problems with HTML, Javascript, Python, etc., but now I'm using Haskell and it doesn't want to cooperate. Here's what it ...
0
votes
0answers
22 views

vim mouse wheel scroll to move cursor but NOT screen viewport

I see plenty of results on Google for how to use the mouse wheel to scroll the visible text in a terminal running vim without changing the cursor position. But I can't find out how to move the cursor ...
0
votes
1answer
44 views

Editing files locally with Vagrant

Is it possible to edit files using non command-line editors, such as Notepad++, with Vagrant?  If so, how would it be done?
0
votes
0answers
6 views

Unicode keyboard on Mac OSX mess VIM editor badly

When I using Unicode keyboard on Mac OSX (Vietnamese in my case) while using normal mode VIM and try to type into the editor (starting with i and then some combination to produce non-ascii ...
1
vote
2answers
51 views

Open iTerm and run Vim from a directory in Finder (OS X)

Is it possible (maybe with Apple Script or something) when I'm in a folder in OSX's finder to open iTerm and run vim with this folder as the working directory? This would be useful to quickly create ...
1
vote
3answers
36 views

using a local version of vim instead of system on CentOS

My school runs centos and a dated version of vim. i want to use a new version of vim so I can have access to stuff I otherwise wouldnt. I built and configured a 7.4.300 version of vim with python, lua ...
0
votes
3answers
49 views

Disable vim plugins for large files

I have a custom Vim configuration that I've been putting together. There's a number of cool plugins and features that aid in PHP development. However, when I open a large file (couple thousand lines) ...
0
votes
1answer
17 views

sourcing the .vimrc gives E174 error

I am using vim on a Mac os X. After editing my .vimrc file and I want to try to reload it without restarting vim. But it gives me the following error. E174: Command already exists: add ! to replace ...
1
vote
1answer
35 views

Firefox — How to open a link (to any text-based file) in Vim?

Rather often, I see web pages with links to files that I want to open directly in gVim (when browsing with Firefox on Windows). Chrome-specific answer — also good to have. Attempting to get this ...
0
votes
1answer
43 views

remove spurious ending spaces when copy pasting from emacs console mode?

I'm not really sure where this comes from but it's really annoying: Using emacs in console mode, and when I want to copy from emacs and paste to another application (possibily another term) I often ...
2
votes
1answer
35 views

why is vim calling this script on startup?

I'm trying to use a custom color scheme. On startup, I can see that vim is loading my scheme, but after that it loads another scheme, overwriting mine. Here's the output of :scriptnames: 1: ...
0
votes
1answer
38 views

Vim yank to tmux clipboard

I see a lot of explanations of how to make vim copy to the system clipboard (involving xclip for linux or pbcopy or OSX), but I would like to yank to the tmux clipboard. To be clear, what I want is to ...
1
vote
1answer
18 views

autocommand BufRead not working in vim when saving an empty buffer

I'm trying to use autocmd to get some filename-specific mappings. I followed some instructions online and write the following thing in my vimrc: autocmd BufRead,BufNewFile special.txt (some mappings ...
0
votes
0answers
32 views

.dotfiles gitignore not ignoring vim/tmp folder

tmp=.dotfiles/vim/tmp.GITIGNORE=.dotfiles/.gitignore. I have created a gitignore for vim/tmp inside my .dotfiles but they are not being ignored. My temp folder contains /backup/swap/undo/ and every ...
0
votes
0answers
13 views

Is there anyway to map cscope's key binding to something else?

I love opening windows in a new vertical split. Right now with cscope I have to use Ctrl SPACE SPACE g to do so. How can I map Ctrl Space Space to Ctrl \ or some other mapping?
2
votes
1answer
44 views

gVim: Pathogen not loading plugins properly (Windows)

I'm using gVim 7.4 on Windows 7 x64. When I place a plugin in the bundle folder, the plugin's commands don't seem to be registered. My setup is as follows: gVim is installed at C:\Program Files ...
0
votes
1answer
39 views

Why does vim open network connections to a process owned by another user?

I just noticed something really weird... When I run lsof of my vim process I see connections to port 6013 of a process owned by another local user. I wonder where they might come from. I trust the ...
0
votes
3answers
100 views

VIM - How to Bold, Italic, Underline and Hypertext Specific Words?

I am new in VIM. I am writing some files using VIM. I did enough research but didn't get the answer anywhere! I just wanted to know how can I Bold, Italic and Underline a word in VIM. Also I want to ...
0
votes
1answer
20 views

How do I open multiple files as part of gVim's launch procedure?

I use gVim a lot in Windows at work to edit text files. I want $VIMRC to always be in buffer 1, and my vim_cheatsheet to always be in buffer 2. I tried putting "e $VIMRC" in my .vimrc, which didn't ...
0
votes
1answer
21 views

Keyboard modes like modes in vim

I'd like to be able to hit capslock and have many keyboard mappings change. j would be mapped to downarrow, k to uparrow etc. like the basics of command mode in vim. Then I'd be able to navigate a ...
0
votes
0answers
29 views

My dot files are version controlled. Can I add sub-modules with Vundle or Pathogen?

I have my .dotfiles version controlled. With symbolic links to .vimrc, .bashrc and .vim. I have recently needed to add some VIM plug ins, command-t and YouCompleteMe. Having looked in to Pathogen and ...
0
votes
2answers
68 views

Why is the cursor flashing at the end of the line in gvim?

I recently started using vim/gvim and I have this really annoying problem where cursors flashes at the end of the line with every character I type in insert mode. Take a look at this video and you'll ...