Vim
Make Shell Scripts Executable By Default
If you use vim to write shell scripts, you might want to save the “chmod +x” command after saving the script.
By adding the following line to your vimrc file (typically, it’s located at ~/.vimrc), scripts will automatically become executable.
au BufWritePost * if getline(1) =~ “^#!” | if getline(1) =~ “/bin/” | silent !chmod a+x <afile> | endif | endif
(meaning, if the file includes #! with “/bin/” in the path, apply “chmod a+x” on this file).
via shell-fu.
Have fun
Edit The Command Line With Vim
This is a quick (and great) tip I found at Daily Vim:
Open a linux terminal, and type some (long) command.
Now type [ctrl]+[x] and then [ctrl]+[e]
The command should be moved now to a vim window.
Edit the command (fix typos, change parameters, etc..) and save.
The command will now be executed.
Enjoy
Posting to Wordpress from Vim
Hi,
I just discovered a cool vim plugin called Vimpress which allows one to post directly from vim.
Actually, this post is published using Vimpress.
I think I’ll be using it for short/simple posts.
That’s it, c ya
About Me
Tags
My Twitter
Categories
- Algorithms
- Bash
- BlackBerry
- Collaboration
- Command Line
- Cool Tricks
- Easter Eggs
- Ebooks
- Firefox
- Hardware
- Humor
- Linux
- Linux Development
- Linux Kernel
- Networks
- Open Knowledge
- Other
- Productivity
- Programming
- Science
- Security
- Shell Scripts
- Short Posts
- Thoughts
- Tools
- Vim
- Web Development
- Websites
Popular Posts
Archives
- March 2010 (1)
- January 2010 (1)
- December 2009 (2)
- September 2009 (13)
- July 2009 (1)
- June 2009 (6)
- May 2009 (4)
- March 2009 (18)
- February 2009 (10)
- January 2009 (10)
- December 2008 (7)
- November 2008 (8)
- October 2008 (1)
- August 2008 (1)
- July 2008 (1)
- June 2008 (2)

Me @ Social Media