Archive for the ‘Vim’ tag
I recently set up the solarized color theme for my terminal emulator. I’ve been meaning to do this for a while, but procrastinated. However, I finally got really frustrated with the colors I get from “ls” sometimes — I use a dark terminal with light fonts, and the directory listings in particular can become invisible, with dark blue on black.
Solarized is much improved. All of the colors work well together and are easy on the eyes. What a relief! Recommended for programmers and system administrators. There are plugins or configuration files for a huge variety of programming environments and programs, including Vim of course.
I use XFCE’s terminal, and I found that there was no terminal configuration file for it in the download. But I found a workaround: just append the colors listed in this file to the end of $HOME/.config/Terminal/terminalrc.
Thanks to a comment on a recent blog post where I lamented the lack of an easy-to-use password manager, I’ve switched from Revelation to… Vim.
I already use Vim for my note-keeping system. I simply add a modeline to the top of the file,
# vim: set ic hlsearch:
This makes searches case-insensitive, so I can just open the file and start typing a search, and it highlights it and moves to the first match as I type. It’s a great way to find something in a file. I have used this simple technique for many years to build a topical index over thousands of interesting email threads, code snippets, posts from bloggers, and customer issues. To use a buzzword, it scales as large as I need it to, and I can quickly find just about anything on any topic I’ve cared about in the past.
The remaining question is how to encrypt the file full of passwords. That’s what Sergio showed me in his comment. There’s a GPG plugin for Vim that detects that I’m opening a GPG-encrypted file and decrypts the buffer for me. This makes it incredibly easy to open, search, edit, and save the file. Much easier than Revelation. I found that the plugin didn’t properly encrypt the file (or I’m doing something wrong), so I first created the file as plain-text and manually encrypted it with GPG, and subsequently the plugin seems to work great.
I still might follow up on Sergio’s suggestions for building something on top of this. I’d really like integration with the desktop: press a key, start typing and seeing matches auto-complete, press TAB when I have the one I want, and copy the password. Maybe I will actually do this. Or maybe a hot-key to simply open Vim with the password file in a terminal is all I need.
Which is better? I don’t know, because I’m a Vim user, so it’s a moot point for me. But I have not noticed any Emacs-style keyboard shortcuts on websites. To the contrary, it seems like everything is Vim-style — certainly most Google apps are Vim-ish, and even Firefox is Vim-ish (press the / key to start searching for text on the page). Based on this highly scientific criterion, I declare Vim the winner.