My .vimrc File

Sometimes you just need a copy of your .vimrc file available to you no matter where you are in the world. Perhaps you are on a computer and need to spin up a WSL instance, maybe you are over at someone else’s workstation.

Who knows what the future might hold. But I know this. Having my vimrc file on the internet for me to copy whenever and wherever I need to is a smart idea.

The best part…if you have found this page, you can have it as well. I don’t mind sharing.


           
            set nocompatible
            syntax enable
            filetype plugin indent on
            set omnifunc=syntaxcomplete#Complete


            let mapleader =" "
            let g:netrw_banner = 0
            highlight Pmenu ctermbg=lightgreen
            highlight PmenuSel ctermbg=brown
            set noerrorbells "This removes vim's default error bell, turning it off so that it doesn't annoy us 
            "set textwidth=120 "Ensures that each line is not longer than 100 columns 
            set tabstop=4 softtabstop=4
            set shiftwidth=4
            set expandtab
            set smartindent 
            set splitright
            set linebreak 
            set number
            set relativenumber
            set showmatch 
            set showbreak=+++
            set smartcase
            set noswapfile 
            set undodir=~/.vim/undodir
            set undofile
            set incsearch 
            "set spell 
            set showmatch 
            set confirm 
            set ruler 
            set scrolloff=13
            set autochdir 
            set autowriteall 
            set undolevels=1000
            set backspace=indent,eol,start 
            "set wrapmargin=110
            " The next two settings ensure that line breaks and wrap work how writers, not
            " coders,  prefer it this way now.
            set wrap

            " Remap for linebreaks
            nnoremap  :set linebreak
            nnoremap  :set nolinebreak

            " Remap to pull up .vimrc in any place via a tab
            nnoremap  :tabedit /home/jonathan/.vimrc

            " Remap for using tab to pull up omnifunction autocomplete
            inoremap   pumvisible() ? "\" : "\\"

            " Remap for escaping insert mode
            inoremap ;;  

            " Remap to yank to system clipboard after having installed Gvim
            vnoremap  "+y

            " Remap for window jumping and resizing in the vertical split orientation
            nnoremap g 
            map vr :vertical resize

            " Map for Markdown Title Block Inseration
            map m :read ~/.vim/templates/Markdown_title_block.md

            " Turn on and off spell check with the spelling suggestion list only 10 lines
            map o :set spell! spelllang=en_us
            set spellsuggest+=10

            "new in vim 7.4.1042
            let g:word_count=wordcount().words
            function WordCount()
                if has_key(wordcount(),'visual_words')
                    let g:word_count=wordcount().visual_words."/".wordcount().words " count selected words
                else
                    let g:word_count=wordcount().cursor_words."/".wordcount().words " or shows words 'so far'
                endif
                return g:word_count
            endfunction

            set statusline+=\ %F\ Char:%c\ Curent_Line:%l\ Total_Lines:%L\ Words:%{WordCount()},
            set laststatus=2 " show the statusline

            call plug#begin('~/.vim/plugged')

            Plug 'tpope/vim-surround'
            Plug 'junegunn/goyo.vim'
            Plug 'tpope/vim-abolish'
            Plug 'jdelkins/vim-correction'
            Plug 'tpope/vim-commentary'
            Plug 'ap/vim-css-color'
            " Plug 'prabirshrestha/vim-lsp'
            " Plug 'mattn/vim-lsp-settings'
            " Plug 'prabirshrestha/asyncomplete.vim'
            " Plug 'prabirshrestha/asyncomplete-lsp.vim'

            call plug#end()

            " configuration for vim-correction

            let g:correction_filetypes = ['text', 'markdown', 'gitcommit', 'plaintex', 'tex', 'latex', 'rst', 'asciidoc', 'textile', 'pandoc' ]

            " goyo configuration

            map f :Goyo \| set bg=light \| set linebreak

           

Jonathan Adams

November 14th, 2025