Some of us are familiar with patch failures like "Hunk #11 FAILED at 958." -- is there a command in VIM that allows me to go to, say, 11th hunk ... without having to manually count it? Even a shortcut to go to the next patch would useful.
Is there any?
Having a chunk of text selected in Vim's visual mode, I'd like to copy that to the system's clipboard (be it the primary or X11's). Is there an easy solution for this? Obviously, a simple y doesn't do the trick.
I'm trying to get started with things like FuzzyFinder, but I am stuck at the point where it says:
INSTALLATION fuf-installation
Put all files into your runtime directory. If you have the zip file, extract
it to your runtime directory.
You should place the files as follows:
your_runtime_directory/plugin/fuf.vim
...
What is my "runtime directory"? How do I know if I have one? Why does it matter how I put things into it?
I've realized that Vim makes some basic tasks very efficient (cutting, deleting, pasting...) I would love to have those features in a word processor. Does anyone know one (I prefer open source).
In GUI style editors, you can generally select multiple lines, press tab a few times to move all the lines across (or shift-tab to go back). I have no idea how to do this in VIM.
I googled around and couldn't find any straight answer to I came here.
I'm working on a project with a friend soon. Given that he cares about these things more than me, I let him choose the indentation. Him being a Ruby fan, he chose two spaces.
My usual is to use tabs. Is there anyway I can set vim to, only in this specific folder, have it as two spaces when I press the tab button?
Is there a way where I can set vim to configure itself based on the filetype? So for example, text files have the equivalent of
:set spell
:syntax off
Where a C source file has
:syntax on
:smartindent on
Thanks for any help.
I can increment integers in Vim using <Ctrl>-a. The docs seem to say that if I set nrformats to "octal,hex,aplha" (which I am trying to do with :set nrformats="octal,hex,alpha") then <Ctrl>-a will increment a to b, 007 to 010, and 0x09 to 0x0f, but those examples are not working for me (I just a get a beep for a, 007 turns into 008, and 0x09 turns into 0x10).
I find that when I type Chinese characters(encoded with utf-8) into VIM,I cannot see them at all while they do exist there.I can copy and paste them into other text editors and it seems everything is fine.How can I fix this problem?Thanks!
When I want to reach to a certain part of a word in Vim (horizontally) I simply press w, b, f or t (something). Is there a good way of doing this vertically? For instance, I want to get to a certain word or a letter of a line that is below or above the line I'm currently in.
PS: Without using :(line number)
Hi,
I'm a pro user of vim, however, somehow I don't seem to have definitively figured out the use of time based undo, or maybe I don't really like it.
Is there a way I can undo a deletion caused by Ctrl-w
W3I will be really grateful for the help.
Thanks.
As a Linux user, I am very used to jump from word to word in vim/nano using ALT+left or right.
This doesn't seem to work properly using iTerm, I am using zsh, I tried adding;
bindkey -e
bindkey '^[[1;9C' forward-word
bindkey '^[[1;9D' backward-word
It does work, but inside zsh only, then I commented those lines and added in iTerm a keyboard shortcut;
It does work, but only for the ALTleft
How can I make it work for the right arrow too?
Vim shows non-printable characters prefixed with a ^ (for instance ^@ for a NUL byte).
I have a column based file containing both printable and non-printable characters which is difficult to read, since each non-printable character shifts all remaining columns one character to the right.
Is there a way to hide non-printable characters or simply display a placeholder char instead? I also don't mind having every character be represented by two characters.
I recently learned a new shortcut in VIM that I find extremely useful.
d/search_text
Which will delete everything up to, but not including, "search_text", from the current position.
However, the thing that is annoying is that this will highlight all occurrences of "search_text" after performing the operation.
Is there any way that I could disable the highlight feature when performing this operation?
Hi, in VIM sometimes when saving, I accidentally hit capital W instead of its lowercase brother. I am prompted for my system password, so I assume it is running a sudo command of some sort, but do you know what?
Thank you!
How can I restore cursor position in Vim as it was before scrolling, selecting or PgUp/PgDn?
I'm tired of searching where I was before I scrolled up to look something at the top.
Are there something like "Prev cursor position" and "Next cursor position" commands (like 'u' and 'R' for regular undo/redo)?
I spend almost all day programming in vim and I am sure that a lot of you do too. What features do you use that make your day to day coding that much better? One that I use is gv, which will let you reselect the previously selected text. Great for reindenting!
Does anyone know if it's possible (or know of an existing vim script or plugin) that can create a "status bar" that shows the name of the current class and method (or function) I'm editing?
I'm imagining that it would plug into the syntax parser for the filetype of the current buffer, and display a breadcrumb trail to show you what you're currently editing. I don't know vimscript well enough to suggest any more than that, but if there aren't any good solutions already, I may begin to hack on one, so suggestions as to where to start are welcome, too!
Hi,
I have problem with printing to postscript from Vim.
I'm, using utf-8 encoding with czech characters like 'šcrž' 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,syntax:n
printer font: courier