Wulf's Webden

The Webden on WordPress

.vimrc

| 0 comments

I’m not under any illusions that my blog is likely to go viral. It doesn’t exist to bring me fame and fortune and even the motivation of interacting with the blogosphere is minimal as the wider ecosystem of blogs run by people I know has shrunk to a small fraction of what it was ten or fifteen years ago. My blogging motivations are mainly to give a ping to the family and friends who follow it that I’m still alive, to maintain a habit of (almost) daily short-form writing to keep those skills polished and to act as a memory aid for things I might want to look up in the future.

It fell a bit short on that last one today. Moving to the new phase of the Windows 11 project at work today went smoothly. I still got to help a few people get used to their upgraded computers but also got to work in the main IT support office and, as a bonus, had a laptop assigned to me. I’ll be getting some additional software installed to help with the extra tasks I’ll be carrying out but it also seemed reasonable to install my favourite text editor (Vim) as I’d done on the machine I used most days in the previous office.

I did have a blog entry describing how to make Vim work with standard Windows key bindings like Ctrl-C for copy but I didn’t have any details of what else was in my standard .vimrc file (the place for personal customisations). It wasn’t too hard to look up some suggestions but, for my own reference, this is what is on my own machine at home:

set nocompatible
set backspace=indent,eol,start
set history=50
set ruler
set showcmd
set incsearch
set tabstop=4
set shiftwidth=4
set foldcolumn=4
set foldmethod=indent
set hls
set autoindent
set number
set visualbell
set gfn=Cascadia_Mono:h12
syntax on
source $VIMRUNTIME/mswin.vim
behave mswin

I also note that, at home, this seems to work from a .vimrc in the root of my user area on the hard drive although the documentation I found today said that I needed a _vimrc file on a Windows box. Perhaps the reason the former didn’t work was that I tried it before I also adjusted the view to show me all file extensions so I could remove the (hidden) .txt on the end of the name? That’s something to experiment with but at least I’ve got an online reference next time I set up a new machine.

Leave a Reply

Required fields are marked *.


This site uses Akismet to reduce spam. Learn how your comment data is processed.