dsfadsfgafgf - my keep it simple vim setup /
--------
Mon 08 Feb 2021 09:15:08 GMT
--------
Let's be honest. Vim is horrible. This is what I did to create a Gemini file
(.gmi) centric Vim and make it less horrible.
It centres the txt draws a nice red line under misspelled words and saves files
with ctrl-s and highlights gemini markup. And that's pretty much all it doe's.
It requires One plugin manager and three plugins.
1. I cleaned out everything from .vim and totally erased the contents of
.vimrc
2. Install a Plugin manager :
3. Install something to make spell checking look a bit nicer.
4. Install a Gemini mark up highlighter.
5. Install Goyo
Did this to my .vimrc.
----
" load pathogen plugin manager.
execute pathogen#infect()
syntax on
set nobackup
filetype plugin indent on
set nocompatible
syntax enable
filetype plugin on
" Remap :wa to ctrl+S and kiss RSI goodbye
nnoremap <silent><c-s> :<c-u>update<cr>
vnoremap <silent><c-s> <c-c>:update<cr>gv
inoremap <silent><c-s> <c-o>:update<cr>
"
set ignorecase
set smartcase
set noerrorbells
set backupdir=~/.cache/vim
" Really this might be a complete waist of time.
set clipboard=xsel
" all about spell checking
"
set spell " spellchecker on by default.
set spell spelllang=en_gb
hi clear SpellBad
hi SpellBad cterm=underline
hi SpellBad cterm=underline ctermfg=red
"
" Insert date using <F5> useful for gemlogs
nnoremap <F5> "=strftime("%c")<CR>P
" insert date whilst in (insert mode) with <F5>
inoremap <F5> <C-R>=strftime("%c")<CR>
"
set ruler " show the cursor position all the time
set incsearch " do incremental searching
set laststatus=2 " Always display the status line in none goyo mode
set backspace=2 " Backspace goes up to II
setlocal textwidth=80
set textwidth=80
" Make it obvious where 80 characters is in none goyo mode
set textwidth=80
set colorcolumn=+1
"Disable Highlight Matched Parentheses
let g:loaded_matchparen=1
"
"This will autoload Goyo for gmi files. Change *.gmi to * to open everything
in goyo mode.
autocmd BufWinEnter *.gmi :Goyo
"
----
Now when I open something in Vim it's kinda normal but when I open a .gmi file
it's ready for editing.
The .vimrc is cobbled together from random bits off the internet, it work's but
I have no idea what most of it is doing, I also had no idea that water could be
rebranded as coolant either so there's that.
It work's with no guarantees.
/gemlog/