I spent a some time configuring the Eventlog-to-Syslog service on my domain controllers, yesterday. A bunch of that time was spent trying to figure out why the service wasn’t able to read the config file I had created.
The upshot is that I had installed a 32-bit version of my text editor of choice. When I created the config file in c:\windows\System32 using 32-bit Vim, the WoW64 file system redirector on Server 2008 R2 was transparently relocating that file to c:\windows\SysWOW64. Then, when I tried to start the service, it failed to find or load the config file because it didn’t exist in the correct location.
So, I have replaced the standard gvim install with the native 64-bit version.
I really like vim, and here’s yet another reason. I can transpose columns in a text table, using visual block mode. As a quick example, let’s say I have a file containing usernames and display names. If I want to switch the order of the columns, here are the steps:
- enable virtualedit: set virtualedit=all
- move to the upper-left corner of a column I want to select
- invoke visual block mode: CTRL-V (CTRL-Q if CTRL-V is mapped to Paste)
- move the cursor (h,j,k,l or shift-arrow) to select the column
- delete the selection: x
- move the cursor to the location where I want to insert the column. (Note that with virtualedit enabled, I can move beyond the actual end of a line)
- paste the column: p
More info at vim docs online.