Lets say I issue :shell command from withing VI. Then I navigate to a directory and decide that I need to edit foo.txt file which I see there. Is there a way to return back to vi from the shell and have foo.txt opened for editing
...
I am editing a LaTeX file with vim. When I am in the \begin{itemize} environment, is there any way to tell vim to autoinsert \item whenever I open a new line?
...
The vim command [I shows a list of declarations. How to do I navigate to one of the items in this list?
...
How to set vim to not indent namespace content in C++?
namespace < identifier >
{
< statement_list > // Unwanted indentation
}
Surprisingly, 'cinoptions' doesn't provide a way to edit namespace content indentation.
...
Hi,
I have problem with printing to postscript from Vim.
I'm, using utf-8 encoding with czech characters like 'ščřž' but in the output I get upside question mark instead of the correct characters.
vim --version
VIM - Vi IMproved 7.2
+iconv
+multi_byte
+postscript
printer settings:
set printoptions=paper:A4,duplex:off,collate:n,syn...
I have following setting which lets me easily create a new file from the currently open file
map <Leader>e :tabe <C-R>=expand("%:p:h") . "/" <CR>
Is there something similar which would let me create a directory from the current directory.
Otherwise what are the other tricks you are using to create a directory and then create a file ...
Hey.
When I paste things from the clipboard, they're normally (always) multilined, and in those cases (and those cases only), I'd like :set paste to be triggered, since otherwise the tabbing will increase with each line (you've all seen it!).
Though the problem with :set paste is that it doesn't behave well with set smartindent, causi...
I have been finally trying to get up to speed with Vim, in this case on Win 64 So I have Vim installed in C:\Program Files (x86)\Vim\
and I have added the DB plug in which seems to be working but I want to configure the help file the inst says to run :helptags $VIM/vimfiles/doc from in Vim but I get C:\Program Files\Vim\vimfiles\doc not...
I'm hoping to call a "static" dictionary function using call(). By "static" I mean that the keyword 'dict' is not used in the function's definition. I use this nomenclature in the hopes that the effect of this keyword is to declare a static member function as is possible in java/C++/etc, ie to put the function name in the class namespa...
I am using the cw (change word) command and the screen does not update until i press the ESC key. I have already set "slow" in my .vimrc.
...
I like to view the current differences in the source files I'm working on with a command like:
vim <(svn diff -dub)
What I'd really like to be able to do is to email that colorized diff. I know vim can export HTML with the :TOhtml, but how do I pipeline this output into an html email? Ideally. i'd like to be able to send an html dif...
I was wondering if there was any key mapping in VIM to allow me to indent certain lines of code (whether those lines have been selected in visual mode, or n lines above/below current cursor position).
So basically something that converts the following
def my_fun(x, y):
return x + y
to
#def my_fun(x, y):
# return x + y
I am...
Ruby 1.9 has a few new syntax elements, such as the {key: value} hash literal syntax. Has anyone written or seen an updated syntax/ruby.vim highlighting file that will highlight key: just like it highlights :key in {:key => value}?
...
say that i have a project which lies in a folder called 'bin', and i want some specific vim configuration automatically loaded when i edit any file inside the project folder. how can i do that?
...
How can I print a blank line at some line with one pressing while not in the insert mode?And after that I should still be in normal mode.
...
vim comes with a nice built-in interactive tutorial. You can access this tutorial by just running:
$ vimtutor
It is very easy to use because it creates working cases for basic commands. Is there a more advanced tutorial? Has any one though to build one to help uses take their VIM skills to the next level. Most tutorial and cheat-s...
I'd like to get the HTML elements highlighted as well as the MAKO / Python elements.
Thanks.
...
I have the following in ~/.vim/ftplugin/python.vim to highlight long lines, accidental tabs and extra whitespace in Python files:
hi CustomPythonErrors ctermbg=red ctermfg=white guibg=#592929
au BufWinEnter *.py call matchadd('CustomPythonErrors', '\%>80v.\+', -1)
au BufWinEnter *.py call matchadd('CustomPythonErrors', '/^\t\+/', -1)
au...
I'm pretty confused by one of the subtleties of the vimscript extend() function.
If you use it to extend a list with another list, it does pretty much what you'd expect, which is to insert the second list into the first list at the index given by the third parameter:
let list1 = [1,2,3,4,5,6] | echo extend(list1,[1,2,3,4,5,6],5)
...
Hi
How can I read the output of an ex command into my current buffer?
For example, I want to read the contents of all the registers into the current buffer, which in ex mode is shown using ":registers"
Thanks
...