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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT REDHAT
ldap_friendly_name
LDAP_FRIENDLY(3) Library Functions Manual LDAP_FRIENDLY(3)
NAME
ldap_friendly_name, ldap_free_friendlymap - LDAP unfriendly to friendly name mapping routine
SYNOPSIS
#include <ldap.h>
typedef struct ldap_friendly {
char *lf_unfriendly;
char *lf_friendly;
} LDAPFriendlyMap;
char *ldap_friendly_name(filename, name, map)
char *filename;
char *name;
LDAPFriendlyMap **map;
void ldap_free_friendlymap(map)
LDAPFriendlyMap **map;
DESCRIPTION
This routine is used to map one set of strings to another. Typically, this is done for country names, to map from the two-letter country
codes to longer more readable names. The mechanism is general enough to be used with other things, though.
filename is the name of a file containing the unfriendly to friendly mapping, name is the unfriendly name to map to a friendly name, and
map is a result-parameter that should be set to NULL on the first call. It is then used to hold the mapping in core so that the file need
not be read on subsequent calls.
For example:
LDAPFriendlyMap *map = NULL;
printf( "unfriendly %s => friendly %s
", name,
ldap_friendly_name( "/usr/share/openldap/ldapfriendly", name, &map ) );
The mapping file should contain lines like this: unfriendlyname friendlyname. Lines that begin with a '#' character are comments and are
ignored.
The ldap_free_friendlymap() call is used to free structures allocated by ldap_friendly_name() when no more calls to ldap_friendly_name()
are to be made.
ERRORS
NULL is returned by ldap_friendly_name() if there is an error opening filename, or if the file has a bad format, or if the map parameter is
NULL.
FILES
/usr/share/openldap/ldapfriendly.conf
SEE ALSO
ldap(3)
ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan
LDAP 3.3 Release.
OpenLDAP 2.0.27-Release 22 September 1998 LDAP_FRIENDLY(3)