Hacker News new | ask | show | jobs
by lwerdna 2902 days ago
Really well done, I like the tags and organization.

Here's a low-tech alternative for .bashrc:

    snipc() {
    	local fpath=$HOME/workspace/snippets.c
    	if [ "$1" == "vim" ]; then
    		gvim $fpath
    	else
    		less $fpath
    	fi
    }
Replace vim with your favorite editor. I also have functions for python (snippy), Make (snipmake), etc.
1 comments

Try using `$EDITOR` instead of an argument as that's a more standard env variable to specify preferred editor!