add headings to vim files

This commit is contained in:
James Dixon 2021-04-26 23:12:27 -04:00
parent 8431a69ff4
commit fc4586d657
6 changed files with 59 additions and 47 deletions

View File

@ -1,3 +1,7 @@
"============
"Autocommands
"============
if has("autocmd") if has("autocmd")
"global autocmds "global autocmds
"----------------- "-----------------

View File

@ -1,5 +1,7 @@
"custom commands "========
"--------------- "Commands
"========
"common typos and abbreviations "common typos and abbreviations
cnoremap w!! w !sudo tee % > /dev/null cnoremap w!! w !sudo tee % > /dev/null
command! W w !sudo tee % > /dev/null command! W w !sudo tee % > /dev/null
@ -7,4 +9,5 @@ command! Q q
command! WQ wq command! WQ wq
command! Q1 q! command! Q1 q!
"useful shortcut commands
command! Trim %s/\s\+$// command! Trim %s/\s\+$//

View File

@ -1,3 +1,7 @@
"=========
"Functions
"=========
"toggle functions "toggle functions
"---------------- "----------------
function! ToggleColorColumn() function! ToggleColorColumn()

View File

@ -1,8 +1,14 @@
"========
"Keybinds
"========
"leader key "leader key
let mapleader=' ' let mapleader=' '
"normal mode keybinds "----------------
"--------------- "regular keybinds
"----------------
"paste and search "paste and search
nnoremap <silent><leader><space> :noh <BAR> :let @/ = ""<CR> nnoremap <silent><leader><space> :noh <BAR> :let @/ = ""<CR>
nnoremap <leader>i :set invpaste<CR> nnoremap <leader>i :set invpaste<CR>
@ -18,30 +24,23 @@ nnoremap <leader>dt :r !date<CR>
"rc files "rc files
nnoremap <leader>rc :vsplit $MYVIMRC<CR> nnoremap <leader>rc :vsplit $MYVIMRC<CR>
nnoremap <leader>rcs :vsplit ~/.vim/settings.vim<CR>
nnoremap <leader>rcf :vsplit ~/.vim/functions.vim<CR>
nnoremap <leader>rcc :vsplit ~/.vim/commands.vim<CR>
nnoremap <leader>rck :vsplit ~/.vim/keybinds.vim<CR>
nnoremap <leader>rcp :vsplit ~/.vim/plugins.vim<CR>
nnoremap <leader>rca :vsplit ~/.vim/autocmds.vim<CR>
nnoremap <leader>rcft :vsplit $HOME/.vim/after/ftplugin/<CR>
nnoremap <leader>rcl :vsplit ~/.config/vimrc<CR>
nnoremap <leader>so :source $MYVIMRC<CR> nnoremap <leader>so :source $MYVIMRC<CR>
nnoremap <leader>rcl :vsplit ~/.config/vimrc<CR>
nnoremap <leader>rcft :vsplit $HOME/.vim/after/ftplugin/<CR>
"windows "windows
nnoremap <leader>cl :close<CR> nnoremap <leader>cl :close<CR>
"formatting tools "formatting tools
nnoremap =j :%!python -m json.tool<CR> nnoremap =j :%!python -m json.tool<CR>
"}}}
"insert mode keybinds
"--------------------
"abbrevations "abbrevations
inoreabbrev <expr> #!! "#!/usr/bin/env" inoreabbrev <expr> #!! "#!/usr/bin/env"
"---------------
"plugin keybinds "plugin keybinds
"--------------- "---------------
"netrw "netrw
nnoremap <silent><leader>e :call ToggleNetrw()<CR> nnoremap <silent><leader>e :call ToggleNetrw()<CR>

View File

@ -1,5 +1,7 @@
"plugins (vim-plug) "==================
"------------------ "Plugins (vim-plug)
"==================
"vim-plug paths "vim-plug paths
let plugDir = expand("$HOME/.vim/autoload/plug.vim") let plugDir = expand("$HOME/.vim/autoload/plug.vim")
let pluginDir = expand("$HOME/.vim/plugged") let pluginDir = expand("$HOME/.vim/plugged")

View File

@ -1,34 +1,17 @@
"================
"general settings
"================
"source system defaults "source system defaults
"----------------------
if filereadable(expand('$VIMRUNTIME/defaults.vim')) if filereadable(expand('$VIMRUNTIME/defaults.vim'))
unlet! g:skip_defaults_vim unlet! g:skip_defaults_vim
source $VIMRUNTIME/defaults.vim source $VIMRUNTIME/defaults.vim
endif endif
"general settings
"----------------
"encoding/format "encoding/format
set encoding=utf-8 set encoding=utf-8
set fileformats=unix,dos,mac set fileformats=unix,dos,mac
"file/buffer
set autoread
set autowrite
set confirm
"display
set background=dark
set number
set wrap
set foldmethod=marker
set listchars=tab:→\ ,extends:,precedes:,nbsp,space,trail,eol
" set list
"drawing
set lazyredraw
set regexpengine=1
set redrawtime=10000
"tab/indent "tab/indent
set tabstop=4 set tabstop=4
set softtabstop=4 set softtabstop=4
@ -48,20 +31,43 @@ set hlsearch
set ignorecase set ignorecase
set smartcase set smartcase
"file/buffer
set autoread
set autowrite
set confirm
"cursor behaviour "cursor behaviour
set virtualedit=block set virtualedit=block
set backspace=indent,eol,start set backspace=indent,eol,start
set scrolloff=2 set scrolloff=2
set sidescrolloff=4 set sidescrolloff=4
"window behaviour (ltr)
set splitbelow
set splitright
"input/timeout "input/timeout
set esckeys set esckeys
set timeoutlen=1000 "for mappings set timeoutlen=1000 "for mappings
set ttimeoutlen=20 "for keycodes set ttimeoutlen=20 "for keycodes
"window behaviour (ltr) "drawing
set splitbelow set lazyredraw
set splitright set regexpengine=1
set redrawtime=10000
"display
set background=dark
set number
set wrap
set foldmethod=marker
set listchars=tab:→\ ,extends:,precedes:,nbsp,space,trail,eol
" set list
"syntax/filetype/matchit
syntax on
filetype plugin indent on
runtime macros/matchit.vim
"os/gui settings "os/gui settings
"--------------- "---------------
@ -87,12 +93,6 @@ if has("gui_running")
endif endif
endif endif
"syntax/filetype/matchit
"-----------------------
syntax on
filetype plugin indent on
runtime macros/matchit.vim
"file cleanup "file cleanup
"------------ "------------
"swap "swap