Re: Vim tip (was Re: Suspend/Resume issues - Custom scripts notrunning? Mouse frozen?)
- From: sathiya moorthy <mail2sathiyamoorthy@xxxxxxxxx>
- Date: Tue, 3 Mar 2009 13:44:52 +0530
But why should we do all these handy..
when we have plugins already. check it out.
http://www.vim.org/scripts/script.php?script_id=365
On Mon, Mar 2, 2009 at 5:52 PM, Andrew McGlashan <
andrew.mcglashan@xxxxxxxxxxxxxxxxxxxxx> wrote:
Chris Bannister wrote:
If you use vim for your editing, put this in your .vimrc file:
" automatically give executable permissions if file begins with #! and
" contains '/bin/' in the path
function ModeChange()
if getline(1) =~ "^#!"
if getline(1) =~ "/bin/"
silent !chmod a+x <afile>
endif
endif
endfunction
au BufWritePost * call ModeChange()
Excellent Chris, I put them into my /etc/vim/vimrc.local file along with
the following useful mods:
map <F10> :set paste<CR>
:map <F11> :set nopaste<CR>
:imap <F10> <C-O>:set paste<CR>
:imap <F11> <nop>
:set pastetoggle=<F11>
" Added this setting for swp file location, so as not to adjust
" date/times of actual directory holding the file(s) being edited
" reference: http://www.vim.org/tips/tip.php?tip_id=20
" - this works even if the working directory is writeable..
set directory=/vim-temporary-swp-files
Now I want to find some more gems like this... you have inspired me.
Kind Regards
AndrewM
Andrew McGlashan
Broadband Solutions now including VoIP
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a
subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
--
sathiyamoorthy
- Follow-Ups:
- References:
- Re: Vim tip (was Re: Suspend/Resume issues - Custom scripts notrunning? Mouse frozen?)
- From: Andrew McGlashan
- Re: Vim tip (was Re: Suspend/Resume issues - Custom scripts notrunning? Mouse frozen?)
- Prev by Date: Re: how to lock my desktop(gnome) ?
- Next by Date: Re: How to change console font?
- Previous by thread: Re: Vim tip (was Re: Suspend/Resume issues - Custom scripts notrunning? Mouse frozen?)
- Next by thread: Re: Vim tip (was Re: Suspend/Resume issues - Custom scripts notrunning? Mouse frozen?)
- Index(es):
Relevant Pages
|