By default, numbers and relativenumbers are on. Then, the autocommands only handle window leave and enter. You might want to add an on/off function for both numbers and relativenumbers.
set relativenumber
set number
augroup vimrc_linenumbering
autocmd!
autocmd WinLeave *
\ if &number |
\ set norelativenumber |
\ endif
autocmd WinEnter *
\ if &number |
\ set relativenumber |
\ endif
augroup END
Anyway, I just wanted to point out that your link to VanLaser should say /u/VanLaser. The URL itself is fine, but /r/ refers to subreddits while /u/ refers to users. :)
]]>All that is to provide background for myself. As a Dvorak keyboard layout user, the claim that HJKL is on home-row doesn’t resonate at all–indeed, H is the only key of those on home row! This post, however, has helped me understand that I need to come to terms with other ways to move.
Perhaps the best part of this journey, so far, is discovering that, with a couple of plugins, Vim can do what NetBeans can do, only better! And installing plugins isn’t so bad, either, when I consider that when I was somewhat required to use NetBeans at work, I had to install a handful of plugins for that, too, to get it up to speed. I’ve been in the process of creating a “dotfiles” repository; as I work on this, I can see that I’ll be able to do with Vim, what I was unable to do with NetBeans: set up an environment I like, then have it cloned an installed on another machine almost instantly…
]]>Thanks for your interesting article which I found while googling for “zen of vim”. Editing with vim, I’m pleased again and again about the elgance and efficiency of “the vim language”.
But where vim is great in editing and navigation capabilities, emacs is great for its versatility. (“Emacs is a great operating system, if only it had a good text editor.” ;-) So why not combine the best of both of them by running emacs by an appropriate vim mode extension, perhaps like extensible vi layer for Emacs. This vim extension comes prebuilt in emacs24, so you probably already now of it. Nevertheless I think, a look at Emacs as My Leader – Vim Survival Guide, where this concept is discussed, is worth the effort.
Personally, I’m not familiar enough yet with the vim language to apply it to emacs as I don’t have sufficient experience with emacs too, but I thought the blog mentioned above could be interesting for you too, as you obviously are working with text editors a lot. So, I wish you happy hacking with which editor and mode ever…
Best regards, Andi
(You would be sorry about my “English”, as I’m a Swiss Citizen ;-)
[x for i in k for x in (‘-c’, i)]
]]>I use the following ‘snippet’ in my shell each time I start a git repo (underscore-delineated identifiers are variables that Dash presents via overlay to be filled-in):
git init
git remote add origin git@github-personal:SteveBenner/__repository-name__.git
echo "# Repo and README created using an automated script, b*tch\!" >> README.md
cp -n ~/.gitignore_global .gitignore
git add -A
git commit -m "Initial commit for git repo stored on Github.com."
git push -u origin master
The ‘@github-personal’ in the git URL refers to an alias in my SSH config file, where I use custom host settings to remove the worry of managing SSH keys, URL protocols, SSH/git settings, all that jazz.
]]>
if [ -f "`which bbedit`" ]; then
bbedit --wait --resume "$@"
else
echo "ERROR: Can't find bbedit. Did you install the command line tools?"
fi