Sponsored Content
Top Forums UNIX for Advanced & Expert Users Vim: different mappings for different window Post 302427680 by sentinel on Monday 7th of June 2010 12:57:00 PM
Old 06-07-2010
Vim: different mappings for different window

My .vimrc file has filetype mappings for different filetypes such as :

autocmd FileType sh map gf ...
autocmd FileType ruby map gf ...

While rewriting a program from one language to another, I have 2 splits, one with shell and one with ruby. I would assume that "gf" would take on its mapping based on filetype. However, it can only hold one mapping at a time.

Is there any way to declare a mapping only for the existing buffer. I tried ":windo" and ":bufdo" but they work for all windows or buffers.
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

window 2000 professional not pinging my window 98 system.

Hello, We someone help me resolve this problem. I have window 2000 professional, windows 98 and Unixware 7.0.1 on the network. I was able to establish connection with all. However, l was unable to ping window 98 from window 2000 professional. I was able to ping the window 2000 from the window... (10 Replies)
Discussion started by: kayode
10 Replies

2. Solaris

Vim 7.0

I want to install VIM 7.0 from sunfreeware.com onto a server. The security guys are giving me a hard time because they found this security vulnerability. http://xforce.iss.net/xforce/xfdb/6259 This vulnerability came out in 2001, and it looks like it was mostly for linux, but I cant be... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

3. UNIX for Dummies Questions & Answers

Need some help with vim

I use vim for writing code. I was using nano but found that vim is a much advanced editor. I am trying to achieve something like this: When trying a loop or a function, I generally type: function name() {} Now when I take my cursor one position to the left and press the return key, it give... (4 Replies)
Discussion started by: Legend986
4 Replies

4. UNIX and Linux Applications

Help with Vim

How do I use compilers and syntax highlighting in (g)Vim? Specifically, I need a Common Lisp compiler and a C++ compiler. Thanks in advance! (Note: Disregard my other topic.) (1 Reply)
Discussion started by: led3234
1 Replies

5. UNIX for Advanced & Expert Users

vim

Does anyone know the fast way to go to tab/2 distance in vim. I mean set four spaces. (1 Reply)
Discussion started by: mirusnet
1 Replies

6. Red Hat

Maximizing X window without Window Switcher

Hi everyone! I have a strange situation. I'm running an NX remote Gnome desktop session. On the remote machine, there is a whole load of unsaved data in a window. A problem that I've been having with this NX session is that I can't load Gnome Applets, including the Window Switcher. So.. when I... (0 Replies)
Discussion started by: alexandicity
0 Replies

7. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

8. UNIX for Advanced & Expert Users

GID mappings cached?

We had a mapping to one UNIX box just fine, the server was changed to another UNIX box and now when mapping drives from Windows box to new UNIX box, we get the old GID associated with our Windows user. When checking on new UNIX box, we see GID of 108, which is what we want, but when we map the... (0 Replies)
Discussion started by: bd4021
0 Replies

9. UNIX for Advanced & Expert Users

Vim :f

Can someone please tell me what this does? :f word I thought that was the way to save files with a different name but after a quick google search I saw it was like this. :w filename (4 Replies)
Discussion started by: cokedude
4 Replies

10. UNIX for Beginners Questions & Answers

Toggle between xterm window and standard terminal window

Is it possible to toggle back and forth between an xterm invoked from one tty, and a shell invoked from a different tty? I am running Centos 7 with KDE and booting in non-graphic mode. After logging in on the default window (/dev/tty1) , I can then use ALT-F2 to access a new window (/dev/tty2),... (1 Reply)
Discussion started by: rhgscty
1 Replies
itemap(1M)																itemap(1M)

NAME
itemap - load an ITE (Internal Terminal Emulator) keyboard mapping. SYNOPSIS
[options] DESCRIPTION
The command loads a keyboard mapping into the ITE (the graphics console driver), or displays ITE keyboard mappings. is run by automati- cally. It is not usually explicitly invoked by the user. Options Dump a keymap to standard output in hexadecimal notation. Load the specified keymap into the kernel mapping table used for keyboards. Interactively prompt for a keyboard mapping. scans the keymap database file for all mapping names beginning with a prefix. Each of these names is displayed, and one must be selected. The name of the keymap database file to be used for input. The default is Load the appropriate keymap. scans the hardware for a keyboard, determines the language of that keyboard, and loads the keymap corresponding to that keyboard. Because cannot determine the language of keyboards, use the option when using with keyboards. Load a specified keyboard map. Once loaded, ITE uses the specified mapping. When loading a keyboard mapping with the option, matches the suffix of the name of the specified keyboard mapping with those found in to determine the keyboard language. This information is used by the ITE to perform ISO 7-to-8 bit conver- sion. Keymap names added by users, via should use the same suffixes as those already used in For example, a French keyboard mapping can be named for consistency with existing and mappings. A mapping called would not match any suffix patterns found by itemap, and would result in incorrect ISO 7-to-8 bit conversion. Load the specified keymap into the kernel mapping table used for keyboards. Perform actions verbosely. If a keymap for a keyboard is loaded, write its name to file_name. EXAMPLES
To automatically install the correct mapping for an keyboard: To explicitly load the mapping for an keyboard: To explicitly load the mapping for a keyboard: To interactively choose a keyboard mapping: To generate a list of the available keyboard mappings: FILES
Keymap database editor System keymap database Contains mapping name configured for keyboards SEE ALSO
ps2(7), termio(7), keymap_ed(1X111). itemap(1M)
All times are GMT -4. The time now is 02:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy