08-06-2009
URGENT : vi doesn't read my .exrc
I have created some custom commands (using the map macro feature) and have those map commands in my $HOME/.exrc file (I am using bash) Here are the commands, which I have in my $HOME/.exrc
map! F /user\.base\.scope^V^Mk4ddF
map! L /user\.base\.search^V^Mk4ddL
map! V /addAllPrivs^V^Mjlcwfalse^V^[V
map! T /addAllPrivs^V^Mk4yy3jpj3e4l3x^V^[T
However for some reason when I launch vi using command like vi /tmp/1.txt and then check the vi session, none of these custom commands are available. I believe somehow it's not reading the $HOME/.exrc file. I tried to copy the same file to $HOME/.vimrc as well. The permissions look OK. Also tried to set EXINIT variable with these commands on one line delimited by "|" but no luck.
I also tried to force vi to read the file by using command like vi -u $HOME/.exrc /tmp/1.txt but still no luck
This is kind of urgent for a production change I have to do in the next hour. Any help will be really appreciated.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a receive script file which had lots of direcorties to process,but now,I don't want to hardcode them,I need input the directory name in a Property.txt file,then write shell code to read the directory name from Property.txt to the script file so I can get flexible on it.But when I ran the sh... (3 Replies)
Discussion started by: joshuaduan
3 Replies
2. Shell Programming and Scripting
Hi -
Trying to take a list of ldap suffixes in a file, run an ldapsearch command on them, then run a grep command to see if it's a match, if not, then flag that and send an email alert.
The list file (ldaplist) would look like -
***********
o=company a
o=company b
***********
**... (7 Replies)
Discussion started by: littlefrog
7 Replies
3. Shell Programming and Scripting
i have written a shell script that invokes main class of a java prg. the java prg does a System.exit(0) or (1) based on condition. how can i read or check the status in unix.... (4 Replies)
Discussion started by: iamcool
4 Replies
4. Shell Programming and Scripting
hi, i have a file with 5 lines, like this:
068|3|20080331|P|21090|5|0|0|0|0|0|0|0
068|3|20080331|P| |6|0|0|0|0|0|0|0
068|3|20080331|P|21040|7|0|233|105|161|6157|6656|101
068|3|20080331|P| |T|188842|33996|14543|3226|7193|247800|298
068|3|20080331|T|... (2 Replies)
Discussion started by: DebianJ
2 Replies
5. Shell Programming and Scripting
Several of our end-users need to send a file to our insurance carrier using ssh and sftp. We've put together a Windows VBS script that opens the ssh tunnel and calls sftp with the -b option pointing to a batch script in the same directory, however sftp doesn't seems to be reading from the... (1 Reply)
Discussion started by: kmw
1 Replies
6. UNIX for Dummies Questions & Answers
Hi
I want to customise my vi environment.So i have created a a .exrc file in my working directory and written all set commands.But when i am invoking vi ,it is not taking any effect of the vi.
Can anybody have any idea what is happening
Thanks in advance
Regds
Sas (12 Replies)
Discussion started by: SasDutta
12 Replies
7. Solaris
Hi all!
Solaris 10.
Why did X-server stop to read OWfontpath?
Any suggestions.
Thanks. (0 Replies)
Discussion started by: wolfgang
0 Replies
8. Solaris
I am trying to install solaris 10-x86 as second OS on top of Windows XP. I have downloaded iso image from Oracle website and burned into bootable cd. when I loaded into CD-drive and made changes in BIOS to boot from CD. Its not reading from CD drive.
After restarting the system with CD(solaris... (8 Replies)
Discussion started by: SunSolars_admin
8 Replies
9. Shell Programming and Scripting
While working on awk programming, i found that it doesn't understand 'read' statement. Then what's the use of 'continue' and 'break' statement in awk.
For ex:
awk '{k=1; while (k<10) {print $0; k++}}' emp.lst
Now, please say if I want to put the logic that after priting 1 line, it will ask for... (13 Replies)
Discussion started by: ravisingh
13 Replies
10. Shell Programming and Scripting
I am trying to run a script to make a simple modification to a number of similar files. The sed works, but after it runs and the differences are displayed, the script does not read ans to start a renaming script if the user answered Y or y.for i in "$@"
do
sed -f myfile.sed $i >$i.new
diff... (2 Replies)
Discussion started by: wbport
2 Replies
LEARN ABOUT DEBIAN
vm_map_lock
VM_MAP_LOCK(9) BSD Kernel Developer's Manual VM_MAP_LOCK(9)
NAME
vm_map_lock, vm_map_unlock, vm_map_lock_read, vm_map_unlock_read, vm_map_trylock, vm_map_trylock_read, vm_map_lock_upgrade,
vm_map_lock_downgrade -- vm_map locking macros
SYNOPSIS
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_map.h>
void
vm_map_lock(vm_map_t map);
void
vm_map_unlock(vm_map_t map);
void
vm_map_lock_read(vm_map_t map);
void
vm_map_unlock_read(vm_map_t map);
int
vm_map_trylock(vm_map_t map);
int
vm_map_trylock_read(vm_map_t map);
int
vm_map_lock_upgrade(vm_map_t map);
int
vm_map_lock_downgrade(vm_map_t map);
DESCRIPTION
The vm_map_lock() macro obtains an exclusive lock on map.
The vm_map_unlock() macro releases an exclusive lock on map.
The vm_map_lock_read() macro obtains a read-lock on map.
The vm_map_unlock_read() macro releases a read-lock on map.
The vm_map_trylock() macro attempts to obtain an exclusive lock on map. It returns FALSE if the lock cannot be immediately acquired; other-
wise return TRUE with the lock acquired.
The vm_map_trylock_read() macro attempts to obtain a read-lock on map. It returns FALSE if the lock cannot be immediately acquired; other-
wise return TRUE with the lock acquired.
The vm_map_lock_upgrade() macro attempts to atomically upgrade a read-lock on map to an exclusive lock.
The vm_map_lock_downgrade() macro attempts to downgrade an exclusive lock on map to a read-lock.
IMPLEMENTATION NOTES
Currently, all of the locking macros implement their locks as sleep locks.
SEE ALSO
vm_map(9)
AUTHORS
This manual page was written by Bruce M Simpson <bms@spc.org>.
BSD
July 19, 2003 BSD