2
votes
2answers
80 views

How can I construct a vim keymapping that inserts the current date?

I'm trying to create a vim keymapping that will initiate the creation of a new file, with the name of the file prefixed with the current date, waiting for me to finish typing the filename. Put more ...
1
vote
1answer
24 views

How can I construct a vim mapping to perform Ctrl-N, but as if iskeyword included '-'?

In Vim, when I'm programming, I often want Ctrl-N to behave as if - were part of a keyword; in other words, have it included in iskeyword. However, I'd like to create a new keymapping for this and ...
0
votes
1answer
31 views

Get hotkey to type a random number as if I typed it on a keyboard on Windows?

In many cases I need to not just generate a list of random integers (which is easy), but to type random integers into various software. For example, to skip a random number of lines (1 to 100) in ...
2
votes
0answers
178 views

Using vim / vimperator key bindings in Midori

I have recently been struggling to find a good lightweight browser with Vim keybindings that will run on Debian Linux (wheezy). Dwb crashes all the time, Luakit is very old, Chromium has memory ...
1
vote
1answer
37 views

How to move cursor to next wrapped line in Vim?

For example, if I have a long line wrapped several times, it is painful to move cursor inside this line, I have to hit w repeatedly, or use f to find what I want, even slower if there are many same ...
0
votes
1answer
62 views

VIM disabling replace mode

In VIM, I find myself reflexively hitting the insert key, before entering text. Normally because I have been doing some reading and often, but not always, I'll have switched out to do a search or ...
0
votes
2answers
96 views

Vim/Sublime Vim bindings move cursor forward/back by one

I'm new to Vim bindings and I want to start using them in Sublime, but ran into a few stumbling blocks. When I type various kinds of enclosed tokens, such as "string literals" or {code blocks} or ...
-3
votes
1answer
55 views

VIM - Detect Whether a Plugin is Active/Running/Open?

I would like to do some tricks with VIM and so I ask the help of you guys! It is possible to detect whether a plugin is active/running/open? You can close a plugin by its name? You can close a ...
1
vote
2answers
63 views

Map Ctrl-Shift-V to an action in vi

I want to be able to paste from the clipboard on gVim on Windows using Ctrl-Shift-V, just like in Terminator. However, if I put this on my .vimrc imap <C-S-V> "+gP The shortcut works ...
1
vote
2answers
72 views

Keystroke to clear the current line at the prompt

How can the current line be cleared? I'm using bash. I don't like ctrl+c because it leaves crap printed on the screen. If the cursor is at the end of the line I can use ctrl+u and it does ...
1
vote
3answers
388 views

Delete last word (Ctrl-W): Make bash shell behave like vim command line

Among the many useful keyboard shortcuts available in the bash shell, there is Ctrl-W to delete the word to the left of the cursor. Let's suppose my command line looks like the following: cp ...
3
votes
1answer
451 views

vim inside tmux: throws “E388” with <C-Left> in insert mode [duplicate]

I've read that in insert mode in vim, one can use <C-Left> and <C-Right> to move by words. This works for me, but only as far as I don't run vim inside tmux terminal splitter. When inside ...
0
votes
2answers
163 views

How to disable auto input focus in Vimium?

Some websites autofocus on input fields as you open a page. That makes some Vimium functions difficult to use because you have to quit the input field first. Is it possible to disable autofocus at ...
1
vote
2answers
354 views

Shortcuts in gvim

I'm trying to migrate from Windows to Linux and am having difficulties with the shortcuts in gvim. For something as simple a copying you press "+y and I'm wondering 1)does order matter when ...
1
vote
3answers
46 views

How to Copy words highlighted after search directly into command line with shortcut?

Here is the situation, for example, I have several lines like this: foo test foo I searched "foo" with "/" and all the two "foo"s above are highlighted. And now I want to replace "foo" with ...
0
votes
1answer
41 views

vim: shortcut to move to the beginning of line and switch from normal mode to insert mode (shortcut of “^” + “i”)

In vim, is there a shortcut that can achieve what both "^" (move to the beginning of line) and "i" (switch to insert mode) can achieve? SO basically, a shortcut that's shorter than "^" then "i".
0
votes
1answer
41 views

Move display line with Ctrl-E in Vim?

I've set noremap j gj and k gk in gVim for particular filetypes, to make Vim move by display lines rather than "actual" lines during navigation. However, I also frequently use the Ctrl-E shortcut to ...
7
votes
3answers
976 views

iTerm2 Vim alt+right/left arrow

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 ...
0
votes
1answer
150 views

Mapping a leader key combination to Shift-Insert in putty while editing in VIM

I use putty (windows) to connect to a remote machine and my daily work revolves around coding in vim. I have to copy paste from the windows clipboard a lot, and for that I use the Shift+Insert key ...
2
votes
1answer
399 views

Why does Option+Left Arrow work in Vim, but not Right Arrow on Mac OS X?

Using Vim in Terminal on Mac OS X, my Option+Left Arrow skips words as expected, but my Option+Right Arrow does nothing. How can I fix this?
0
votes
3answers
191 views

Vim editor: select word with Alt+Return

I used a certain editor for many years and got used to selecting words with Alt+Return. I can't lose that habit and still try to do that in Vim too often, always without success. So I try these: ...
2
votes
2answers
340 views

Vim editor: using 'z' as leader key

I know the 'z' key has some kind of special function in Vim, it activates many double key shortcuts (so does 'g'), but almost all of them are assigned to folding, something that I never use. So I ...
2
votes
1answer
155 views

How can you view source and keep Vim commands enabled in Vimium?

When I view source using Vimium, it disables the Vim commands. Ideally would like to keep the commands active so that I can search the source code using regex and avoid having to switch back to the ...
0
votes
1answer
238 views

Binding caps lock key to another unique key

I've been mapping my caps lock key on windows machines to various keys (I have tried both Backspace, which I have never gotten used to due to deeply ingrained habit, and Esc, which will take time to ...
0
votes
2answers
55 views

In Vim what command will put the cursor at the last character in a file, not the last line?

I realize that G will move the cursor to the last line in a file, but is there a command that will move to the last character? I know I can type G$ to do this but I thought there might be a single ...
1
vote
1answer
742 views

How to bind up arrow in ~/.inputrc (readline) for vim insert mode?

When in Readline apps with vim mode enabled in ~/.inputrc (set editing-mode vi) is there a way to bind the <Up> arrow key in vi-insert mode? To display previous history item, for example. It ...
1
vote
0answers
354 views

What are the missing features in Sublime Text 2 that are available in vim? [closed]

I'm a Sublime Text 2 user who tried switching to vim because everyone swears by it. In the first few hours I realized I need to install a lot of plugins what essentially end up emulating GUI in the ...
2
votes
2answers
2k views

Vim style cursor movement for Notepad++

I was just wondering if there was a way to get "vim" style cursor movement (i.e. 'hkjl' movement). After spending much time with vim, I have gotten used to not having to lift my hands off the keyboard ...
4
votes
3answers
1k views

Remap CapsLock(tap) to ESC and CapsLock(hold) to CTRL in OS X Lion

For vim purposes, I'd like to remap CapsLock to CTRL when used in combination with other keys and ESC when used in isolation. None of the existing solutions give both functionality - only one or the ...
2
votes
1answer
594 views

How can you switch the j and k keys in vim?

Is there any way to map the k key to 'down' and the j key to 'up'? This seems much more intuitive to me, since the right arrow will also move the cursor down, if it's at the end of the line. Why was ...
5
votes
1answer
2k views

Can I use the `<cmd>` key in terminal Vim at all?

Following on from my other recent question: How do I map <cmd>-<shift>-f to run Ack plugin in Vim? Is is possible to use the <cmd> key in Vim at all? If Vim doesn't recognise the ...
4
votes
2answers
1k views

How do I map <cmd>-<shift>-f to run Ack plugin in Vim?

I'm new to vim and I'm trying to map a key combo for running the Ack plugin found here: https://github.com/mileszs/ack.vim I want to map cmd-shift-f to run the Ack command :Ack. I've added the ...
3
votes
1answer
1k views

mac iTerm2 unbind command + / Find Cursor shortkey [duplicate]

Possible Duplicate: Is it possible to remove a built-in shortcut from an application in Mac OS X? I'm looking for some way to unbind command + / key by default binded to the View -> Find ...
6
votes
1answer
1k views

Looking for non-conflicting cross-platform keybinding consistency

I use Mac OS X and Arch Linux and occasionally log into FreeBSD and Debian servers by ssh. My favoured tools are zsh, ssh, tmux, git, vim and irssi. I use iTerm2 on Mac OS X and unicode-rxvt on Arch ...
2
votes
2answers
1k views

Shortcut for redo in vim

In vim, u = undo r = replace Is there one key shortcut for redo ? ctrl + r is a two key stroke (in my thinking), and I often hit the wrong combination (I just recently switch to Mac) Or is it ...
2
votes
2answers
793 views

Use of hash (#) on OS X with UK MacBook Pro

I have MacVim on a UK MacBook Pro. I can use the hash on TextMate by typing alt 3 but in vim this does not work. Do you know how I can type a hash using VIM on a UK MacBook Pro? The problem is ...
1
vote
2answers
1k views

Ctrl+W s not splitting windows in Vim

I am trying to use Ctrl+w s to split a window in Vim. However it is not working in my case. I opened a file using vim filename. Then I pressed Ctrl+w s. But as soon as I press just Ctrl+w it clears ...
1
vote
1answer
103 views

Vim: Make f (t,F,T) continue on line breaks

I just found out about f and its siblings (t,F,T) and naturally I am intrigued (they seem slightly more efficient than using / - especially with commands like d). But they do not follow line breaks. ...
0
votes
1answer
738 views

Map escape+s to save file in vim

I want a shortcut to save the current file in Vim. I want to map escape+s to :w. I tried :map <esc-s> :w but it doesnt work.
0
votes
2answers
338 views

MacVim-like keyboard shortcuts in gVim

MacVim has some nifty features like Cmd + S to save Cmd + Z to undo, and so on, is there a port like this for gVim.
2
votes
1answer
209 views

How do I get Unifying Keyboard to swap caps lock and control key on Mac OS-X?

I recently bought the Logitech K320 keyboard. However, when I tried to swap my caps lock key and control key via system preferences, it wouldn't take. Has anyone got this to work?
9
votes
6answers
1k views

Using Vim key bindings in Onenote

I found ViEmu, which allows you to use Vim key bindings in Visual Studio and certain Office applications. Does anyone know of similar software for using Vim key bindings in Microsoft Onenote? Free or ...
2
votes
1answer
750 views

How to toggle showing line numbers in vim using a single key press?

I have the following entries which allow me to turn the line numbers on/off with simple key presses nmap <F11> :se nonu<CR> nmap <F12> :se nu<CR> Is it possible to instead ...
3
votes
2answers
885 views

VIM: How do you get the last ex command you used?

I find that sometimes I write a really long ex mode command that do lots of stuff. They are sort of "mini-scripts" that I write in the text editor then I start ex mode and copy them into the ex line ...
2
votes
4answers
560 views

Vim equivalent to Emacs C-i?

Does Vim have a command equivalent to Emacs' Ctrl-I? Emacs has an extremely useful shortcut "C-I" which fixes indentation of the current line (or selected lines.) For example, suppose you write this ...
2
votes
3answers
885 views

In linux, how do I map “caps lock” to “escape” while in Vim, but *not* in other applications?

Inspired by this question. I would like to remap Caps Lock to escape, but only when I am in vim. I would like to keep Caps Lock untouched while not in vim.
4
votes
1answer
399 views

How do I increment strings in Vim?

I can increment integers in Vim using <Ctrl>-a. The docs seem to say that if I set nrformats to "octal,hex,alpha" (which I am trying to do with :set nrformats="octal,hex,alpha") then ...
1
vote
1answer
1k views

How to change key mappings in Cygwin's Vim

I'm using Vim under Debian, Win Vista and WinXP (the latter two with Cygwin). To handle tabs more easily, I mapped <C-Left> and <C-Right> to :tab(prev|next). This mapping works like a ...
6
votes
5answers
2k views

How do I delete the next line in vim?

In emacs, whenever I want to delete a few lines of text, I just use C-k until all the text is gone. However, in vim it seems a bit more complex. I know I can do d$ to delete until the end of the ...
12
votes
3answers
2k views

Vim visual mode, stay selected

I love vim's visual mode. However when I select some text then do something to it the text is then unselected. For example lets say that I select a block of code and indent it the code is then ...