It wasn't me. You can't prove anything.


2008-08-24

Spell checker in VIM

Found this information in about four places on the net. It all look like it all comes from some original somewhere, but I cannot tell which is the original. None of this is my code. It is all cut and paste.

My /etc/vimrc


" Activate spell checker.

setlocal spell spelllang=en_us

highlight clear SpellBad
highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline
highlight clear SpellCap
highlight SpellCap term=underline cterm=underline
highlight clear SpellRare
highlight SpellRare term=underline cterm=underline
highlight clear SpellLocal
highlight SpellLocal term=underline cterm=underline

set spellfile=~/.vim/spellfile.{encoding}.add


I pasted this to the bottom of the /etc/rc file and spelling started to work. At work, I have so many different needs that I have two /etc/vimrc files. vim -u <file name> will let you switch to a different vimrc file. That is convenient because the underlined words  and different colors would get in the way at work .I primarily keep VIM working on my home box because I'm one yum updated from a broken NEdit. NEdit is the 'normal' text editor. NEdit is more like the editors in Windows. Lets face it, I'm more used to this kind of editor. I use NEdit at work ,but it just plane doesn't work on half the servers so I keep VIM working.

VI comes in handy when I cannot get X working over the network. Some prefer nano, or pico, but those suck. I go with vi. Any modern machine works with it I've heard some people use EMacs exclusively because vi is too feature rich. I would have said you are nuts if you had told me that a couple years ago. However, recently, I've noticed all the crap out there for vi. I bet there is a book titled "All the VIM crap you didn't know about" If not, there needs to be one. Funny thing, the last place you can find good information about VI or VIM (same thing I think) is the official web site. The Wikipedia is interesting if not very technical.

VIM is one of the first programs I found when starting out on Linux. Someone pointed me towards the program when I couldn't get anything else to work. If you ask me VIM is easier to learn that EMacs. That is saying a lot because VIM is a pain in the ass to learn. I tell you, VIM and other command line programs nearly turned me off Linux all together. I thought that if that is a sample of how to get something done,to hell with this worthless OS. I got over it. VIM seems much easier than many alternatives. The truth is, I know it already so anything else is something new to learn. Sad, but true.

It has gotten to the point that I do not bother keeping information like this locally. I used to keep documents on my local machine and backed up somewhere so I could go look the information up the next time I needed it. Now, I rely completely on the internet to hang on to the information for me. This is really, really bad because I do not trust the internet to be what it is today in a couple years. I really do believe that something is going to give out in the name of cyber security. That is, we are not going to have a an internet anymore in a couple years. We are going to have a web of interlinked commercial s for government approved products. Oh, and porn. Porn makes too much money and generates far too high tax revenue to just let it fall by the way-side.

No comments: