I'm looking for a way to sort in selected block in Vim. The scenario is I have something like this {:a :c :b} # after sort, it should be {:a :b :c} How I do it now is I have to enter :a and :c to new lines, running sort on selected block and then put
I'm currently using this on my .tmux.conf bind -n C-h if "[ $(tmux display -p '#{pane_current_command}') = vim ]" "send-keys C-h" "select-pane -L" bind -n C-j if "[ $(tmux display -p '#{pane_current_command}') = vim ]&qu
I am trying to show trailing spaces as periods but tabs as tabs in Vim. Here is the help document I am looking at. 'listchars' 'lcs' string (default "eol:$") global {not in Vi} Strings to use in 'list' mode and for the |:list| command. It is a c
I recently started to use vim. When I start coding, I usually start with following format. ('_' denotes the location of a cursor.) int main(){ _ } Here is what I have done 1. type int main(){} 2. ctrl-o h (move left) 3. enter twice 4. ctrl-o k (move
Trying to customise a JavaScript dev environment with these instructions. I can build the Plugins with vim +PluginInstall +qall, I'm using Vundle, but I get a Not an editor command: SyntasticInfofrom vim. I have the same problem with :Helptags. How c
mkview and loadview are fantastic ways to save state in vim, and many people use .vimrc commands such as this to automatically save state on all files. au BufWinLeave ?* mkview au BufWinEnter ?* silent loadview This creates the state files (in a loca
I saw a screencast where someone had highlighted a set of parenthesis and instantly converted them to curly braces. Is this a macro or a Vim thing?you can do it with surround.vim plugin. https://github.com/tpope/vim-surround e.g. when your cursor (*)
I'm trying to install Syntastic for Vim using Cygwin. After completing step 2.1 and the cloning part of step 2.2 in the installation guide of Syntastic, I find that now when I run vim I get the following errors: Error detected while processing /home/
As was discussed here: Vim auto complete, both with current file and dictionary, I am trying to use both dictionary and current file in determining suggestions during auto-complete. In my vimrc I have the following two lines for auto-complete: set co
Extremely frustrated. I have diffs that look like this (going on and on for nearly the whole file, in nearly every file I edit): even though I only modified one line. I have tried adjusting various core git config settings like autocrlf, whitespace,
I have a version of vim with both clipboard and xterm_clipboard support. However, "*y or "+y don't copy to the system clipboard. I know I can use :w !pbcopy (and even create a shortcut for it), but I really want the standard way. I saw fakeclip
I'm a beginner vi user. I don't know the terminology, but I want to split my gvim terminal(screen?) into 2 windows which each have 5 different files(buffers?). I can open the first 5 files in one window, then split to a second window, but I don't kno
I want to automate running several commands in vim, i.e. by typing :repl. The commands are: :ConqueTerm lein repl <Esc> :set syntax=clojure <i> How do I define a custom vim function (command) that executes the above? About the above: clojure -
If this question is not considered to have this place in this forum, tell me I will remove it instantly ! I have installed on my ubuntu a vim plugin (called NERDTree). It works well when I open a file with a non-root status. When I run vim as a root
I'm experiencing a very slow startup of gvim with tex files and the latex-suite plugin. For example, opening this tex file takes 7 seconds. A minimal .vimrc file only contains the following line: filetype plugin on My .vim folder only contains the la
I have a huge file (8GB), I want replace on the first 30 lines the String LATIN1 with UTF-8 what is the most efficient method? Means exist there a way to use probably sed but to quit after parsed first 30 lines. VIM was not able to save the file in 3
a lot time again I once used the set of commands, but forgot it. I want to to this, (not yy or 10yy), In vi editor, I need to copy a block. There are many ways, but one way is very quick. 1, label the first line by some way, 2, then label the end lin
Is it possible with any command to convert this flux(1,i) flux(2,i) flux(3,i) flux(4,i) flux(5,i) to this in VI? flux(i,1) flux(i,2) flux(i,3) flux(i,4) flux(i,5) In general i want to convert flux(a,b) to flux(b,a)Do a replace regex, swapping the two
Janus is good piece of pre-configured ViM [and its plugins]. There are two different hooks .vimrc.before which runs before Janus is loaded, and .vimrc.after which runs after Janus is loaded but before any plugins are loaded. All seems fine, but I cou
I am working with text files that contain a lot of unicode characters (≼, ⊓, ⊔, ...). Vim displays them fine, but when I print they are replaced by a generic character. Gedit prints them without problem, but it's a bit of a pain to launch another edi
I still have troubles with numbers in Vim: p.e. let a = 1.02 | let b = '10000000' | let total = a*b | echo total --> 1.02e7 I would like to avoid Exponentials. How can I have the output 10200000 ? let a = 4000000000 | let b = '1' | let total = a+b |
I often create a temporary mapping to do something on a particular file. Typical example is this: :map <leader>f :w<cr>:! bundle exec cucumber features/account/sign_in.feature:41<cr> I want the file features/account/sign_in.feature to be
I have about 15 Emacs years behind me and picked up Vim about a year ago. Currently I am more or less equally efficient in both (as far as editing is concerned) and love both. Now the lisp hacking experience in Emacs is something extraordinary; every
In Vim, is it possible to change the default location of the user vimrc file, i.e., from $HOME/.vimrc to some other location ?You must start vim with the command vim -u ./path/to/your/vimrcfile vim -u NONE is a good way to start Vim without any plugi
I have a function which performs validity checking on the current file (so as to conform to my employer's coding standards). I would like to call this function before saving, i.e. using BufWritePre. However, I would to prevent saving the file if it f
I am using vim 7.3, the NERDTree 4.1 plugin and VCSCommand version 1.99.42. To commit a directory in VCSCommand you need have the directory buffer open (it's the same with all commands on directories), however whenever I try to open a directory buffe
I am using Vim with TagList in development. TagList seems to be very nice, but one problem with that is that it takes a long time to refreshe, so if for example I mean from the function A to the function B in the same file, it takes around 5 seconds
I'm using GVIM under Windows. And want to map CAPSLOCK to Ctrl+^ Any way to do this? Btw, I see tons of samples over the web how to swap CAPS and Esc using registry hack, but none of them use VIM map command, instead external tools and registry chang
How can I quickly quote/unquote words and change quoting (e.g. from ' to ") in Vim? I know about the surround.vim plugin, but I would like to use just Vim.surround.vim is going to be your easiest answer. If you are truly set against using it, here ar
I have a text file that contains a long list of entries (one on each line). Some of these are duplicates, and I would like to know if it is possible (and if so, how) to remove any duplicates. I am interested in doing this from within vi/vim, if possi