1
vote
1answer
18 views

Doesn't “scrollwheelup/down” mapping work in gvim on windows OS?

I tried it all ways to make the mouse buttons ScollWheelUp/Down work in my vim. Checked in all other plugins if there is a conflicting map, no conflicting map. Tried this: :verbose map ...
3
votes
1answer
45 views

Mapping s-tab in vim

I'm trying to set up some basic configuration for vim to make it more useful for myself. One of the things I'm trying to do is map shift+tab to a literal tab character, since my vim configuration sets ...
0
votes
1answer
21 views

Mapping key to make new vertical window in Vim

This is really odd. Here's the key mapping from my .vimrc: noremap <C-n> :vert new<CR> The expected behaviour when I press CTRL-n is that it opens a vertical window but it somehow opens ...
0
votes
1answer
43 views

gvim mapping keys to ex commands while in visual mode?

So in gvim, after I press <Shift> + v it goes into visual mode. I normally have an ex command set for the letting 'm'. When I go into visual mode and then hit 'm' it says No range allowed ...
0
votes
1answer
71 views

<CR> not recognized as variable in VIM vimrc using PuTTY

My code In my vimrc file I have added a key mapping to create new tabs. map 1 :tabnew<CR> The problem However, when I press 1 in vim, it prints the ` variable as a string literal. I will ...
2
votes
2answers
53 views

Extending Vim Mappings to Run N Times

I want to be able to type something like 'Ncom' in normal mode that will comment out the current and then next N-1 lines. A key-mapping that I made to do so is, :nmap com ^i#<ESC>j. This does ...
1
vote
1answer
128 views

Vim: remap 'D' modifier on linux

I'm using Mac-oriented vimfiles with linux. In this config modifier D (Cmd key on Mac) is intensively used. I don't want to change every D to M, but I want to remap D to something like Meta or Alt. Is ...
0
votes
1answer
258 views

Fast jk Escape in Vim using ttimeout

I recently came across the timeout and ttimeout features in vim. I use the key sequence jk to escape from insert to normal mode. I thought, following this article Mapping fast keycodes [see 2b], ...
1
vote
1answer
1k views

How to map PageDown and PageUp Keys to function normally

When I open a document using vi or vim, I am unable to navigate the page using Page Up and Page Down keys. On pressing these keys, vim seems to behave in abnormal maaner, and changes the case of ...
2
votes
3answers
608 views

Should I learn Vim without mapping keys?

I have been using vim for a few months its been a love/hate relationship. I love the concept of modal editing and never having the need to move you hands from the keyboard. The problem is that a lot ...
0
votes
2answers
133 views

Vim: strange behavior of “\” in insert mode

I'm editing a lot of tex files using vim, and therefore I use the \ character a lot. Yet, when inserting a \ in insert mode, vim pauses the cursor on the same spot for one second, unlike with any ...
0
votes
1answer
77 views

map a command with vim

How can I map a command in vim which does something like: :command (I write here and press enter) (Executes another command with the things that I wrote) or :badd my_buffer_name :b my_buffer_name ...
0
votes
2answers
451 views

how to open cpp and h files automaticcaly and split them

hi i'm new to vim but i'm loving it. with NERDtree plugin i want to have a little script then when i open a file (.cpp or .h) it opens automatically the .h and .cpp splitted with .h in uppeer split ...
3
votes
3answers
1k views

How to get the key name to be coded for keymap in vimrc?

In Emacs, I can press Ctrl-h, k, to describe a key. I can get the key name even it's undefined, e.g., C-x <C-M-end> is undefined Thus, I got to know the key name is C-x <C-M-end>. But ...
0
votes
0answers
423 views

MacVim with Mac Keyboard: Where Is the Right CTRL Key? [duplicate]

Possible Duplicate: Emulating the ‘right ctrl’ key on MacBook Pro keyboard (which lacks an actual ‘right ctrl’ key) I can't seem to find it... and I want to use it for MacVim to facilitate ...
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 ...
1
vote
3answers
1k views

Vim: Bind <C-Enter>

Using vim for editing latex; how can I bind C-Enter? I tried the following, which does not work: imap <C-Enter> \\<CR> and imap <C-Return> \\<CR> However, something like: ...
3
votes
2answers
3k views

How to remap a NERDTree shortcut in VIM

I use the Dvorak keyboard layout with VIM, and the 't' key is the 'up' motion when editing a regular file. The problem is that NERDTree remaps 't' to open files in a new tab. How can I undo that ...
8
votes
1answer
7k views

Mapping Left Alt key in Vim?

I am able to map the key combination Right Alt+Left Arrow with <a-left> or by <m-left>. But I am not able to map the Left Alt key. Is there a way to do that? Edit: Just to clarity ...
3
votes
2answers
514 views

Vim: go to beginning or end of the visual area

I want to do some tricky mappings that wraps currently selected visual area with some code. In order to do that I need to make sure that I am at the beginning of the current visual area. Is there any ...
3
votes
3answers
1k views

Vim Hotkeys For Specific File

Is it possible to set hotkey for specific file types in vim. For example, if I am editing a .java file, I'd like vim to run javac .java when I press 5. Is this possible?