───────┬────────────────────────────────────────────────────────────────────────
       File: /home/mitch/.vimrc
───────┼────────────────────────────────────────────────────────────────────────
   1    " Title......: .vimrc
   2    " Description: My setting file for vim
   3    " Author.....: Mitchell Johnston
   4    " Updated....: Fri 05 Apr 2024 12:27:37 AM CDT
   5    " Updated....: Sat Aug  2 09:19:42 AM CDT 2025
   6    "
   7    " Reference
   8    " =========
   9    "
  10    " Macros
  11    " j gj      Allows scroll down in sentence by line
  12    " k gk      Allows scroll up in sentence by line
  13    " \b        Markdown __bold__ word
  14    " \i        Markdown _italic_ word
  15    " \e        Open tab with emoji
  16    " \l        Run dictionary lookup script (default to lookup word under cursor)
  17    " \N        Toggle line numbers
  18    " \n        Scratch Pad
  19    " \s        Search KJV
  20    " \S        Toggle spell check
  21    " \t        Term in split window
  22    " \T        Term in a Tab
  23    " \v        Open .vimrc in new tab, sources when saved
  24    " \pb       Paragraph style=blue
  25    " \py       Paragraph style=yellow
  26    " \pr       Paragraph style=red
  27    " \pg       Paragraph style=green
  28    " \wa       Bash Cookbook
  29    " \wb       Bash Quick ref
  30    
  31    " Control and Alt Key mappings
  32    " A-g Mark class=green
  33    " A-r Mark class=red
  34    " C-b Mark class=blue
  35    " C-t Toggle Terminal
  36    " C-y Mark class=yellow
  37    
  38    " F-Keys
  39    " F2 New tab Netrw
  40    " F3 Get URLS in current buffer (uses youtube-dl)
  41    " F4 - Open menu in console mode
  42    " F5 - autocomplete, forward Insert mode
  43    " F6 Replace current line with kjv output
  44    " F7 Replace current line with formated output for file under /var/www (mp4 or
  45    " picture)
  46    " F8 Replace current line with link to file unde /var/www
  47    " F9 Run ./compiler in current directory
  48    " F12 Open file current buffer
  49    " S-F12 Open file new tab
  50    
  51    " :Commands
  52    
  53    " :Plug{tab}   Plugin manager
  54    " :term        Open a split window term
  55    " :TableModeToggle   VIM Table Mode toggle
  56    
  57    " Typing savers 
  58    " ==============
  59    
  60    " bash
  61    ab _var # Variables<CR>---------<CR><ESC>0D
  62    ab _func # Functions<CR>---------<CR><ESC>0D
  63    ab _main # Main<CR>----<CR><ESC>0D
  64    
  65    " urls
  66    ab _crn http://crn.hopto.org/ 
  67    ab _email mitch@crn.hopto.org
  68    ab _gop gopher://crn.hopto.org
  69    ab _Jesus [Jesus](/Jesus)
  70    ab _kjv [KJV](/#kjv)
  71    ab _KJV [KJV](/#kjv)
  72    ab _Bible [Bible](/bible)
  73    ab _bible [Bible](/bible)
  74    ab _study [Study Bible](/study)
  75    
  76    " dates
  77    ab _date <C-R>=strftime("%a %b %d %Y")<CR>
  78    ab _time <C-R>=strftime("%r %Z")<CR>
  79    ab _u Updated: <C-R>=strftime('%A %m/%d/%y')<CR>
  80    
  81    " admonitions
  82    ab _? :question: 
  83    ab _! :exclamation: __Important:__
  84    ab _ao 🎧 __Audio Only__
  85    ab _bl 🤬 __Warning bad language__
  86    ab _c :computer: __Code:__
  87    ab _ch :chart_with_upwards_trend: _Chart Of The Day:_
  88    ab _hc :sparkling_heart: __Health Clip__
  89    ab _d 🥵 __Warning Disturbing__
  90    ab _fun :laughing: __Some humor to lighten the day:__
  91    ab _geek 🧠 __Geek Related:__
  92    ab _k :key: 
  93    ab _l - [🔗 title](link){target="blank"}<ESC>04l
  94    ab _memo :memo: __Note:__
  95    ab _book 📖 __Worth Reading:__
  96    ab _mw 🤓 ___Must Watch___
  97    ab _rl :+1: __Rule of Thumb__
  98    ab _tip :bulb: __Tip:__
  99    ab _up 🔧 __Updates:__
 100    ab _warn :warning: __Warning:__
 101    ab _ar  🔗 _Off-site Artical_
 102    
 103    " misc 
 104    ab --0 [🔝](#)<CR><HR><CR><ESC>
 105    ab --1 <hr class="one">
 106    ab --2 <hr class="two">
 107    ab --3 <hr class="three">
 108    ab --p <hr class="packman">
 109    ab _A >🎧 Audio Included<CR>
 110    ab _V >🎥 Video Included<CR>
 111    ab _L ### [🔗 title](link){target="blank"} <C-R>=strftime("%r %Z")<CR><ESC>44h
 112    ab _D >📃 Disclaimer: Please be aware that I post content from non-believers, because I feel it has value. Use your discernment and remember if it conflicts with God's words, toss it.<CR><ESC>
 113    ab _mj Mitchell Johnston - UID 0
 114    ab _nl :newspaper: __News Links:__<CR>
 115    ab _see - [👓 See more](link)
 116    ab _sn - [📝 Show Notes](link){target="blank"}<ESC>21h
 117    ab _ts :mortar_board: [__Theological Seminary Of The Air__](/mp3/ruckman/theologic-seminary-of-the-air/)<CR>
 118    ab _tb {target="blank"}
 119    ab _div <div style="text-align: center;">
 120    ab _re <u>Related:</u>  
 121    ab _U </u>
 122    ab _u <u><ESC>i
 123    ab _vc <script src="https://av1611.com/verseclick/verseclick.js"></script>
 124    ab _iframe <iframe src="link" scrolling="no" width="100%" height="400" style="border:1px solid black;"></iframe>
 125    ab _Iframe <iframe src="link" scrolling="no" onload="resizeIframe(this) style="border:1px solid black;"></iframe>
 126    
 127    " Offsite
 128    ab _axe - [🔗 Dr Axe](https://draxe.com/){target="blank"} 
 129    ab _ak - [🔗 Andrew Kaufman, M.D.](https://rumble.com/c/c-1128483){target="blank"} 
 130    ab _da - [🔗 Dr. Ardis](https://thedrardisshow.com/){target="blank"} 
 131    ab _dlm - [🔗 Dr. Lee Merritt](https://drleemerritt.com/){target="blank"} 
 132    ab _ep - [🔗 Eric Peters](https://www.ericpetersautos.com/){target="blank"} 
 133    ab _dk - [🔗 The David Knight Show](http://www.thedavidknightshow.com/){target="blank"}<CR>- [🔗 David Knight Gold](https://davidknight.gold/){target="blank"} 
 134    ab _fed - [🔗 Flat Earth Dave](https://flatearthdave.com/){target="blank"} 
 135    ab _gr2 - [🔗 GregReese](https://rumble.com/user/GregReese){target="blank"} 
 136    ab _jl - [🔗 Jon Levi](https://jonlevichannel.com/){target="blank"}<CR>- [📖 Evidence of the OLD WORLD by Jon Levi and David Edward](https://www.amazon.com/Evidence-Old-World-David-Edward/dp/B0CJ4546QY/)<CR>
 137    ab _kb - [🔗 Dr. Ken Berry](https://www.drberry.com/){target="blank"}<CR>- [📖 His books](https://www.amazon.com/stores/Ken-D.-Berry-MD/author/B0777N6CYH)<CR>
 138    ab _lrt - [🔗 Lei's Real Talk](https://rumble.com/c/c-1991822){target="blank"}  
 139    ab _mia - [🔗 Man in America](https://rumble.com/c/ManInAmerica){target="blank"}  
 140    ab _mi - [🔗 Mises](https://mises.org/){target="blank"}  
 141    ab _mlb - [🔗 MYLUNCHBREAK](https://rumble.com/c/MYLUNCHBREAK){target="blank"} 
 142    ab _norm - [🔗 Norml](https://norml.org/){target="blank"}  
 143    ab _rc - [🔗 Rain Country](https://rumble.com/c/RainCountryHomestead){target="blank"}  
 144    ab _pft - [🔗 Press for Truth](https://pressfortruth.ca/){target="blank"}  
 145    ab _rg - [🔗 ReallyGraceful](https://rumble.com/user/reallygraceful){target="blank"}<CR>- [📖 The Deep State Encyclopedia: Exposing the Cabal's Playbook](https://www.amazon.com/Deep-State-Encyclopedia-Exposing-Playbook/dp/B0BW2K4GRT/ref=sr_1_1?crid=L3E7PRK32XAF&dib=eyJ2IjoiMSJ9.abdCs2CjZJUaoZb39XP1UU8PqU7hXwaPfdKvrBkA9eCv7-LBc27eAel8xNDCA9zbfMUzTLgmqVOaHUFVH93Cd75NVYt7BO7hi5OldPhjRiz70HMSGAcxacy0gIN3us4p.OuuQzd1UMe1hFSXk6R4NUlJB66CS144pPKpvG3mP8MA&dib_tag=se&keywords=deep+state+encyclopedia+really+graceful&qid=1726739581&sprefix=really+gra%2Caps%2C158&sr=8-1){target="blank"} 
 146    ab _sr - [🔗 Solari Report](https://home.solari.com/){target="blank"}  
 147    ab _stl - [🔗 Switched To Linux](https://switchedtolinux.com/){target="blank"}  
 148    ab _tav - [🔗 The Last American Vagabond](ihttps://www.thelastamericanvagabond.com/ima-palantir-ai-panopticon/){target="blank"}  
 149    ab _wf - [🔗 The Why Files](https://rumble.com/c/TheWhyFiles){target="blank"}  
 150    
 151    " On-site
 152    
 153    ab _911 - [🎬 More on 911](/media/911/)
 154    ab _addict - [🎬 More on Addiction](/media/health/addiction/)
 155    ab _arc - [🎬 For more content check the archives](/media/) 
 156    ab _ba - [💻 Bible Analyzer](/media/bible-analyzer)
 157    ab _berg - [🎬 More from Dr Berg](/media/health/dr-berg/)<CR>- [⬇️ Downloadable Resources](https://www.drberg.com/resources)
 158    ab _bio - [🎬 More on Biography](/media/biography/)
 159    ab _chicks - [🎬 More on Chickens](/media/prep/chickens-rabbits/)
 160    ab _cooper - [🎬 More from Bill Cooper](/media/bill-cooper/)
 161    ab _control - [🎬 More on Control](/media/control/)
 162    ab _covid - [🎬 More on Covid](/media/health/covid/)
 163    ab _cr - [🎬 More from James Corbett](/media/corbett/)<CR>- [📖 Reportage: Essays on the New World Order](https://reportagebook.com/){target="blank"}<CR>
 164    ab _cults - [🎬 More on Cults](/media/cults/) 
 165    ab _dental - [🎬 More on Dental](/media/health/dental/)
 166    ab _detox - [🎬 More on Detox](health/#detox)
 167    ab _diet - [🎬 More on Diet](/media/health/diet/)
 168    ab _dirt - [🎬 More on Diatomaceous Earth](/media/health/minerals/diatomaceous-earth/)
 169    ab _env - [🎬 More on Environment](/media/environment/)
 170    ab _em - [🎬 More Eustace Mullins](/media/eustace-mullins/)
 171    ab _flat - [🎬 More on Flat Earth](/media/flat/) 
 172    ab _gatto - [🎬 More from John Talor Gatto](/media/john-t-gatto/)<CR>- [📖 Books](https://www.amazon.com/stores/John-Taylor-Gatto/author/B001K7S0AE)<CR> 
 173    ab _gear - [🎬 More on Gear](/media/gear/) 
 174    ab _geg - [🎬 More from G.Edward Griffin](/media/g-edward-griffin/) 
 175    ab _gipp - [🎬 More from Sam Gipp](/media/gipp)<CR>- [📖 Daystar Publishing](https://daystarpublishing.org/)<CR>
 176    ab _gr - [🎬 More from Gail Riplinger](/media/riplinger/)<CR>- [📖 AV Publications](https://avpublications.com/)<CR> 
 177    ab _garden - [🎬 More on Gardening](/media/prep/garden/) 
 178    ab _hemp - [🎬 More on Hemp](/media/health/remedies/hemp/) 
 179    ab _herbs - [🎬 More on Herbs](/media/health/remedies/herbs/) 
 180    ab _history - [🎬 More on history](/media/history/) 
 181    ab _jd - [🎬 More from Dr James Dinicolantonio](/media/health/dr-james-dinicolantonio/)<CR> - [Store](https://linktr.ee/drjamesdinic)<CR>
 182    ab _law - [🎬 More on Law](/media/law/)
 183    ab _km - [🎬 More on Kary Mullis](/media/health/kary-mullis/)<CR>- [📖 Dancing Naked in the Mind Field](https://www.amazon.com/Dancing-Naked-Mind-Field-Mullis-ebook/dp/B004AM5R0W?ref_=ast_author_mpb)<CR>
 184    ab _larkin - [🎬 More from Larkin Rose](/media/larkin/)<CR>- [The Most Dangerous Superstition](https://www.amazon.com/Most-Dangerous-Superstition-Larken-Rose-ebook/dp/B00UV41W2U?ref_=ast_author_dp)<CR>
 185    ab _levy - [🎬 More from Dr Thomas Levy](/media/health/dr-thomas-levy/)<CR>- [📖 Dr. Levy's Books](https://www.tomlevymd.com/books.php)<CR>
 186    ab _mica - [🎬 More from Mica Colston](/media/mica-colston/)
 187    ab _min [🎬 More on Minerals](/include/vids/health/minerals/)
 188    ab _money - [🎬 More on Money](/media/money/) 
 189    ab _mp3 - [🎧 MP3 Files](/mp3)
 190    ab _ortho - [🎬 More on Orthomolecular Medicine](/include/vids/health/orthomolecular/)
 191    ab _pets - [🎧 More on Pets](/media/prep/pets/)
 192    ab _pics - [🎨 More Pictures](/pics)
 193    ab _radio - [🎬 More on Radio](/media/gear/radio/)
 194    ab _rem - [🎬 More on Remedies](/include/vids/health/remedies/)
 195    ab _mms - [🎬 More on MMS](/include/vids/health/remedies/mms)
 196    ab _ruckman - [🎬 More from Peter Ruckman](/media/ruckman/)<CR>- [📖 BBB Store](https://store.kjv1611.org/)<CR>
 197    ab _sam - [🎬 More from Dr Sam Bailey](/media/health/dr-sam-bailey/)<CR>- [📖 The Final Pandemic: An Antidote To Medical Tyranny](https://www.amazon.com/Final-Pandemic-Antidote-Medical-Tyranny-ebook/dp/B0CW1QXP31/ref=sr_1_1?sr=8-1)<CR>- [📖 Terrain Therapy: How To Achieve Perfect Health Through Diet, Living Habits & Divine Thinking](https://www.amazon.com/Terrain-Therapy-Achieve-Perfect-Thinking/dp/1991185502/ref=sr_1_2?sr=8-2)<CR>- [📖 Virus Mania: Corona/COVID-19, Measles, Swine Flu, Cervical Cancer, Avian Flu, SARS, BSE, Hepatitis C, AIDS, Polio, Spanish Flu. How the Medical Industry ... Billion-Dollar Profits At Our Expense](https://www.amazon.com/Virus-Mania-COVID-19-Hepatitis-Billion-Dollar-ebook/dp/B08YFBCH2F/ref=sr_1_3?sr=8-3)<CR>
 198    ab _sircus - [🎬 More from Dr Mark Sircus](/media/health/dr-mark-sircus/)<CR>- [drsircus.com/](https://drsircus.com/)<CR>
 199    ab _save - [🔗 Salvation (forgiveness)](/salvation)
 200    ab _selft - [🎬 More on Self Therapy](/media/health/self-therapy/)
 201    ab _spy - [🎬 More on Spying](/media/spying/) 
 202    ab _survive - [🎬 More on Survival](/media/survive/)
 203    ab _tea - [🎬 More on Tea](/include/vids/health/remedies/tea/)
 204    ab _tracks - [📚 Tracks](/tracks)
 205    ab _turp - [🎬 More on Turpentine](/include/vids/health/remedies/essential-oils/turpentine)
 206    ab _vax - [🎬 More on Vaccines](/media/health/vaccines/)
 207    ab _vernon - [🎬 More from Dr Vernon Coleman](/media/health/vernon/)
 208    
 209    
 210    " Create task, check off, uncheck (see my .bashrc functions 'today' & 'task')
 211    ab ,c - [ ]
 212    map ,x :s/\[ \]/\[❌\]<CR> " Complted
 213    map ,X :s/\[❌\]/\[ \]<CR> " Unmark completed
 214    map ,i :s/\[ \]/\[🔨\]<CR> " In progress
 215    map ,I :s/\[🔨\]/\[ \]<CR> " Unmark In progress
 216    map ,o :s/\[ \]/\[⭕\]<CR> " Outsourced
 217    map ,O :s/\[⭕\]/\[ \]<CR> " Unmark Outsourced
 218    
 219    " Settings
 220    " ========
 221    
 222    
 223    set wildoptions=pum
 224    "set lines=27
 225    "set columns=80
 226    
 227    set cryptmethod=blowfish " use blowfish encryption for encrytped files
 228    set switchbuf=usetab     " when switching buffers, include tabs
 229    set splitright           " create vertical splits to the right
 230    set splitbelow           " create horizontal splits below
 231    set formatoptions=croq   " c=autowrap comments, r=continue comment on <enter>,
 232                             " o=continue comment on o or O, q=allow format comment with gqgq
 233    set backspace=2          " allow backspacing over everything in insert mode
 234    set encoding=UTF-8
 235    
 236    
 237    " Folds
 238    set foldenable               " Enable folding
 239    set foldmethod=indent        " Folding based on markers
 240    set foldlevelstart=10        " open most folds by default
 241    set foldnestmax=10           " 10 nested fold max
 242    
 243    " Tabs
 244    set hardtabs=4               " Tab setups
 245    set tabstop=4
 246    set shiftwidth=4
 247    set expandtab                " tab to spaces
 248    set softtabstop=4            " number of spaces in tab when editing
 249    set tabpagemax=15            " Max number of tabs displayed
 250    set showtabline=2            " always display tab line
 251    
 252    " Completion
 253    set dictionary+=~/etc/words-alpha.txt "Ctr-n, Ctr-p word complete
 254    set complete+=k
 255    set ignorecase               " On searches
 256    set infercase
 257    set autoindent               " Good for codding
 258    set smartindent              " Turn on file typed indenting
 259    set shiftround               " When shifting lines, round the indentation to the nearest multiple of “shiftwidth.”
 260    set history=50               " keep 50 lines of command line history
 261    set laststatus=2             " Make sure the status line is always displayed
 262    set nocompatible             " Better for Vim features
 263    set shell=/bin/bash          " Set default shell
 264    set scrolloff=0              " Start scrolling when I'm 3 lines from top/bottom
 265    set backspace=indent,eol,start "Allow backspacing over indention, line breaks and insertion start
 266    set lbr!                     " wrap on words
 267    set formatoptions+=j         " Delete comment characters when joining lines.
 268    set spell                    " Turn on spell check
 269    set belloff=all
 270    
 271    " Display
 272    set nu rnu                   " turn on line numbers
 273    set ruler                    " Display ruler
 274    set showcmd                  " Show commands
 275    set showmatch                " Show matching brackets
 276    set showmode                 " Display what mode you are in
 277    set wildmenu                 " visual autocomplete for command menu
 278    " Allow crosshair cursor highlighting.
 279    hi CursorLine   cterm=NONE ctermbg=0
 280    hi CursorColumn cterm=NONE ctermbg=0
 281    nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
 282    "set list                     " show hidden characters
 283    set listchars=eol:¬,tab:→→,trail:.,extends:>,precedes:<
 284    set autoread
 285    
 286    " Search
 287    set path+=**                 " :find {file} supports wilecard
 288    set wildmenu                 " tab completetion 
 289    set hlsearch                 " Highlight search matches
 290    set smartcase                " Turn off ignorcase if caps is used
 291    set incsearch                " search as characters are entered
 292    
 293    " netrw setting
 294    let g:netrw_liststyle = 3
 295    let ghregex='\(^\|\s\s\)\zs\.\S\+'
 296    let g:netrw_list_hide=ghregex
 297    
 298    " backup files
 299    silent !mkdir ~/.vim/backup > /dev/null 2>&1
 300    set viminfo='1000,f1,<500    " File information to Keep
 301    set backup                   "Turn on backups
 302    set backupdir=~/.vim/backup     "The place to remove files after I make big errors
 303    set backupskip=/tmp/*,~/.vim/backup/*
 304    set writebackup              "Make backup before overwriting the current buffer
 305    set backupcopy=yes           "Overwrite the original backup file
 306    au BufWritePre * let &bex = '@' . strftime("%F.%H:%M")
 307    
 308    " Keep undo history across sessions by storing it in a file
 309    if has('persistent_undo')
 310        call system('mkdir ~/.vim/undo')
 311        set undodir=~/.vim/undo/
 312        set undofile
 313        set undolevels=1000
 314        set undoreload=10000
 315    endif
 316    
 317    " Vim-plug
 318    if empty(glob('~/.vim/autoload/plug.vim'))
 319      silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
 320        \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
 321      autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
 322    endif
 323    
 324    " Plugins will be downloaded under the specified directory.
 325    call plug#begin('~/.vim/plugged')
 326    " Declare the list of plugins.
 327    
 328    Plug 'junegunn/fzf'
 329    Plug 'junegunn/fzf.vim'
 330    Plug 'katono/rogue.vim'
 331    Plug 'dhruvasagar/vim-table-mode'
 332    Plug 'hallison/vim-markdown'
 333    Plug 'ap/vim-css-color'
 334    Plug 'glensc/vim-syntax-lighttpd'
 335    Plug 'jclsn/glow.vim'
 336    Plug 'marcopaganini/termschool-vim-theme'
 337    
 338    
 339    "Vim Rogue options
 340    let g:rogue#name = 'Mitch'
 341    let g:rogue#directory = '/home/mitch/etc'
 342    let g:rogue#jump = '1'
 343    let g:rogue#tombstone = '1'
 344    let g:rogue#fruit = 'Grapes'
 345    
 346    " enable this plugin for filetypes, '*' for all files.
 347    let g:apc_enable_ft = {'text':1, 'markdown':1, 'php':1}
 348    
 349    " List ends here. Plugins become visible to Vim after this call.
 350    call plug#end()
 351    
 352    " File types 
 353    " ==========
 354    augroup configgroup
 355        autocmd!
 356        autocmd BufNewFile,BufFilePre,BufRead *.md set filetype=markdown 
 357        autocmd BufNewFile,BufFilePre,BufRead *.txt set filetype=txt
 358        autocmd FileType make setlocal noexpandtab
 359        autocmd BufEnter Makefile setlocal noexpandtab
 360        autocmd BufEnter *.sh setlocal tabstop=2
 361        autocmd BufEnter *.sh setlocal shiftwidth=2
 362        autocmd BufEnter *.sh setlocal softtabstop=2
 363        au BufNewFile,BufRead *conkyrc* set filetype=conkyrc
 364        autocmd bufwritepost .vimrc source $MYVIMRC
 365        autocmd bufwritepost sp.md <ESC>:!pandoc sp.md -o sp.html<CR>
 366    augroup END
 367    
 368    " Display setup 
 369    " ==============
 370    colorscheme termschool
 371    :set guioptions-=r  "remove right-hand scroll bar
 372    set background=dark " Modify for dark background
 373    "set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
 374    "au InsertEnter * hi StatusLine term=reverse ctermbg=5 gui=undercurl guisp=Magenta 
 375    "au InsertLeave * hi StatusLine term=reverse ctermfg=0 ctermbg=2 gui=bold,reverse 
 376    
 377    " using Source Code Pro
 378    set anti enc=utf-8
 379    set guifont=Source\ Code\ Pro\ 16
 380    filetype plugin on
 381    syntax on
 382    set conceallevel=2
 383    
 384    " Set style for spelling errors
 385    hi clear SpellBad
 386    hi SpellBad cterm=reverse 
 387    hi SpellBad gui=reverse
 388    
 389    " Macros 
 390    " ======
 391    map j gj
 392    map k gk
 393    map <leader>s i### 📈 Site Stats<CR><pre><ESC>:r !stats<CR><ESC>o</pre><CR><ESC>
 394    map <leader>S 17dd<ESC>i### 📈 Site Stats<CR><pre><ESC>:r !stats<CR><ESC>o</pre><CR><ESC>
 395    map <leader>l <ESC>:term ++close lu <c-r><c-w><CR>
 396    map <leader>N <ESC>:set nu! rnu!<CR>
 397    map <leader>pb 0i<p class="blue"><ESC>A</p><ESC>
 398    map <leader>pg 0i<p class="green"><ESC>A</p><ESC>
 399    map <leader>pr 0i<p class="red"><ESC>A</p><ESC>
 400    map <leader>py 0i<p class="yellow"><ESC>A</p><ESC>
 401    map <leader>qn :tabedit ~/Documents/jots/scratch.md<CR>
 402    " vim-powered terminal in split window
 403    map <Leader>t :term ++close<cr>
 404    tmap <Leader>t <c-w>:term ++close<cr>
 405    
 406    " vim-powered terminal in new tab
 407    map <Leader>T :tab term ++close<cr>
 408    tmap <Leader>T <c-w>:tab term ++close<cr>
 409    map <leader>v :tabedit $MYVIMRC<CR>
 410    map <leader>wb <ESC>:!epy ~/Documents/books/tech/dev-bash/bash-pocket-reference.epub<CR>
 411    map <leader>wh <ESC>:!epy ~/Documents/books/tech/dev-web/oreilly-html-and-css-the-good-parts-by-the-good-parts.epub<CR>
 412    noremap <space> za " space open/closes folds
 413    noremap H :set hlsearch!<CR>
 414    
 415    " HTML
 416    " ----
 417    " Highlite in blue (Ruckman) or yellow (mine) or green X-ref
 418    map <C-b> 0i<mark class="blue"><ESC>A</mark><ESC>03j
 419    map <C-y> 0i<mark class="yellow"><ESC>A</mark><ESC>03j
 420    map <A-g> 0i<mark class="green";<ESC>A</mark><ESC>0
 421    map <A-r> 0i<mark class="red";<ESC>A</mark><ESC>0
 422    
 423    " Function keys
 424    " -------------
 425    
 426    " noh - no highlight
 427    map <esc> :noh <CR>
 428    
 429    " <F2> Explorer in newtab
 430    map <F2> <ESC>:tabe .<CR>
 431    map! <F2> <ESC>:tabe .<CR>
 432    
 433    " This calls my download manager. I make a list in vim, hit F3 and it downloads them.
 434    map <F3> <ESC>:w ~/Downloads/get.txt<CR>:term ++close /home/mitch/bin/get -d<CR>>
 435    
 436    " F4 - autocomplete, backward Insert mode
 437    "inoremap <F4> <C-P>
 438    :source $VIMRUNTIME/menu.vim
 439    :set wildmenu
 440    :set cpo-=<
 441    :set wcm=<C-Z>
 442    :map <F4> :emenu <C-Z>
 443    
 444    " F5 - autocomplete, forward Insert mode
 445    inoremap <F5> <C-N>
 446    
 447    " This allows me to insert a Bible quote in to a document.
 448    map <F6> <ESC>0D<ESC>:.!kjv 
 449    map! <F6> <ESC>0D<ESC>:.!kjv 
 450    
 451    " pi take the name of a mp4 or picture file under /var/www and will return html with png
 452    " created for a markdown document.
 453    map <F7> <ESC>0D<ESC>:.!pi 
 454    map! <F7> <ESC>0D<ESC>:.!pi 
 455    
 456    " mkln is "make link" will return markdown formated link with emoji for major
 457    " file types, and will auto-local file under /var/www.
 458    map <F8> <ESC>0D<ESC>:.!mkln 
 459    map! <F8> <ESC>0D<ESC>:.!mkln 
 460    
 461    " Run external compiler (used for CRN’s AV Bible)
 462    map <F9> <ESC>:w!<ESC>:tab term ++close glow -p %<CR>
 463    
 464    " <F10> Place holder
 465    
 466    " Easy tab navigation
 467    nnoremap <Leader>1 1gt
 468    nnoremap <Leader>2 2gt
 469    nnoremap <Leader>3 3gt
 470    nnoremap <Leader>4 4gt
 471    nnoremap <Leader>5 5gt
 472    nnoremap <Leader>6 6gt
 473    nnoremap <Leader>7 7gt
 474    nnoremap <Leader>8 8gt
 475    nnoremap <Leader>9 9gt
 476    
 477    
 478    " ===== new status line ====
 479    
 480    "" This was made by Reddit user u/SamLovesNotion. Also with the help of - https://tdaly.co.uk/projects/vim-statusline-generator/ for learning the syntax. Sorry for English & grammar, this post was made in hurry.
 481    
 482    " Images - https://www.reddit.com/r/vim/comments/ld8h2j/i_made_a_status_line_from_scratch_no_plugins_used/
 483    " I have used Nerd icon fonts. Icons won't work without them. https://github.com/ryanoasis/nerd-fonts/
 484    
 485    " This statusline looks exactly like Vim Airline (even more customizable & powerful) & loads faster than Vim airline. Only take few ms to load.
 486    
 487    " STARTUP TIME - With Vim Airline - ~250ms. With this statusline - ~100ms. Without any statusline - ~98ms.
 488    
 489    " Add all of this at the end of your vimrc OR Create separate file like 'statusline.vim' & 'colorsgroup.vim' & source those files in your main vimrc.
 490    " e.g. source "~/.config/vim/statusline.vim"
 491    
 492    
 493    
 494    " Color highlighting groups
 495    " Add this AFTER `colorscheme` option in your vimrc. Otherwise your colorscheme will clear this highlightings. OR use ColorScheme autocommand. VERY IMPORTANT.
 496    
 497    " Color pallet
 498    " Green  - #2BBB4F (BG) - #080808 (FG)
 499    " Blue   - #4799EB
 500    " Violet - #986FEC 
 501    " Yellow - #D7A542
 502    " Orange - #EB754D
 503    " Grey1  - #202020
 504    " Grey   - #303030
 505     
 506     
 507    " Define color variables
 508    let g:StslineColorGreen  = "#2BBB4F"
 509    let g:StslineColorBlue   = "#4799EB"
 510    let g:StslineColorViolet = "#986FEC"
 511    let g:StslineColorYellow = "#D7A542"
 512    let g:StslineColorOrange = "#EB754D"
 513     
 514    let g:StslineColorLight  = "#C0C0C0"
 515    let g:StslineColorDark   = "#080808"
 516    let g:StslineColorDark1  = "#181818"
 517    let g:StslineColorDark2  = "#202020"
 518    let g:StslineColorDark3  = "#303030"
 519     
 520     
 521    " Define colors
 522    let g:StslineBackColor   = g:StslineColorDark2
 523    let g:StslineOnBackColor = g:StslineColorLight
 524    "let g:StslinePriColor   = g:StslineColorGreen
 525    let g:StslineOnPriColor  = g:StslineColorDark
 526    let g:StslineSecColor    = g:StslineColorDark3
 527    let g:StslineOnSecColor  = g:StslineColorLight
 528     
 529     
 530    " Create highlight groups
 531    execute 'highlight StslineSecColorFG guifg=' . g:StslineSecColor   ' guibg=' . g:StslineBackColor
 532    execute 'highlight StslineSecColorBG guifg=' . g:StslineColorLight ' guibg=' . g:StslineSecColor
 533    execute 'highlight StslineBackColorBG guifg=' . g:StslineColorLight ' guibg=' . g:StslineBackColor
 534    execute 'highlight StslineBackColorFGSecColorBG guifg=' . g:StslineBackColor ' guibg=' . g:StslineSecColor
 535    execute 'highlight StslineSecColorFGBackColorBG guifg=' . g:StslineSecColor ' guibg=' . g:StslineBackColor
 536    execute 'highlight StslineModColorFG guifg=' . g:StslineColorYellow ' guibg=' . g:StslineBackColor
 537     
 538     
 539     
 540    " Statusline
 541    
 542    " Enable statusline
 543    set laststatus=2
 544    
 545    " Disable showmode - i.e. Don't show mode like --INSERT-- in current statusline.
 546    set noshowmode
 547    
 548    " Enable GUI colors for terminals (Some terminals may not support this, so you'll have to *manually* set color pallet for tui colors. Lie tuibg=255, tuifg=120, etc.).
 549    set termguicolors
 550    
 551    
 552    
 553    " Understand statusline elements
 554    
 555    " %{StslineMode()}  = Output of a function
 556    " %#StslinePriColorBG# = Highlight group
 557    " %F, %c, etc. are variables which contain value like - current file path, current colums, etc.
 558    " %{&readonly?\"\ \":\"\"} = If file is readonly ? Then "Lock icon" Else : "Nothing"
 559    " %{get(b:,'coc_git_status',b:GitBranch)}    = If b:coc_git_status efists, then it's value, else value of b:GitBranch
 560    " &filetype, things starting with & are also like variables with info.
 561    " \  - Is for escaping a space. \" is for escaping a double quote.
 562    " %{&fenc!='utf-8'?\"\ \":''}   = If file encoding is NOT!= 'utf-8' ? THEN output a "Space" else : no character 
 563    
 564    
 565    
 566    " Define active statusline
 567    
 568    function! ActivateStatusline()
 569    call GetFileType()
 570    setlocal statusline=%#StslinePriColorBG#\ %{StslineMode()}%#StslineSecColorBG#%{get(b:,'coc_git_status',b:GitBranch)}%{get(b:,'coc_git_blame','')}%#StslineBackColorFGPriColorBG#%#StslinePriColorFG#\ %{&readonly?\"\ \":\"\"}%F\ %#StslineModColorFG#%{&modified?\"\ \":\"\"}%=%#StslinePriColorFG#\ %{b:FiletypeIcon}%{&filetype}\ %#StslineSecColorFG#%#StslineSecColorBG#%{&fenc!='utf-8'?\"\ \":''}%{&fenc!='utf-8'?&fenc:''}%{&fenc!='utf-8'?\"\ \":''}%#StslinePriColorFGSecColorBG#%#StslinePriColorBG#\ %p\%%\ %#StslinePriColorBGBold#%l%#StslinePriColorBG#/%L\ :%c\ 
 571    endfunction
 572    
 573    
 574    
 575    " Define Inactive statusline
 576    
 577    function! DeactivateStatusline()
 578    
 579    if !exists("b:GitBranch") || b:GitBranch == ''
 580    setlocal statusline=%#StslineSecColorBG#\ INACTIVE\ %#StslineSecColorBG#%{get(b:,'coc_git_statusline',b:GitBranch)}%{get(b:,'coc_git_blame','')}%#StslineBackColorFGSecColorBG#%#StslineBackColorBG#\ %{&readonly?\"\ \":\"\"}%F\ %#StslineModColorFG#%{&modified?\"\ \":\"\"}%=%#StslineBackColorBG#\ %{b:FiletypeIcon}%{&filetype}\ %#StslineSecColorFGBackColorBG#%#StslineSecColorBG#\ %p\%%\ %l/%L\ :%c\ 
 581    
 582    else
 583    setlocal statusline=%#StslineSecColorBG#%{get(b:,'coc_git_statusline',b:GitBranch)}%{get(b:,'coc_git_blame','')}%#StslineBackColorFGSecColorBG#%#StslineBackColorBG#\ %{&readonly?\"\ \":\"\"}%F\ %#StslineModColorFG#%{&modified?\"\ \":\"\"}%=%#StslineBackColorBG#\ %{b:FiletypeIcon}%{&filetype}\ %#StslineSecColorFGBackColorBG#%#StslineSecColorBG#\ %p\%%\ %l/%L\ :%c\ 
 584    endif
 585    
 586    endfunction
 587    
 588    
 589    
 590    " Get Statusline mode & also set primary color for that mode
 591    function! StslineMode()
 592    
 593        let l:CurrentMode=mode()
 594    
 595        if l:CurrentMode==#"n"
 596            let g:StslinePriColor     = g:StslineColorGreen
 597            let b:CurrentMode = "NORMAL "
 598    
 599        elseif l:CurrentMode==#"i"
 600            let g:StslinePriColor     = g:StslineColorViolet
 601            let b:CurrentMode = "INSERT "
 602    
 603        elseif l:CurrentMode==#"c"
 604            let g:StslinePriColor     = g:StslineColorYellow
 605    
 606            let b:CurrentMode = "COMMAND "
 607    
 608        elseif l:CurrentMode==#"v"
 609            let g:StslinePriColor     = g:StslineColorBlue
 610            let b:CurrentMode = "VISUAL "
 611    
 612        elseif l:CurrentMode==#"V"
 613            let g:StslinePriColor     = g:StslineColorBlue
 614            let b:CurrentMode = "V-LINE "
 615    
 616        elseif l:CurrentMode==#"\<C-v>"
 617            let g:StslinePriColor     = g:StslineColorBlue
 618            let b:CurrentMode = "V-BLOCK "
 619    
 620        elseif l:CurrentMode==#"R"
 621            let g:StslinePriColor     = g:StslineColorViolet
 622            let b:CurrentMode = "REPLACE "
 623    
 624        elseif l:CurrentMode==#"s"
 625            let g:StslinePriColor     = g:StslineColorBlue
 626            let b:CurrentMode = "SELECT "
 627    
 628        elseif l:CurrentMode==#"t"
 629            let g:StslinePriColor     =g:StslineColorYellow
 630            let b:CurrentMode = "TERM "
 631    
 632        elseif l:CurrentMode==#"!"
 633            let g:StslinePriColor     = g:StslineColorYellow
 634            let b:CurrentMode = "SHELL "
 635    
 636        endif
 637    
 638    
 639        call UpdateStslineColors()
 640        
 641        return b:CurrentMode
 642    
 643    endfunction
 644    
 645    
 646    
 647    " Update colors. Recreate highlight groups with new Primary color value.
 648    function! UpdateStslineColors()
 649    
 650    execute 'highlight StslinePriColorBG           guifg=' . g:StslineOnPriColor ' guibg=' . g:StslinePriColor
 651    execute 'highlight StslinePriColorBGBold       guifg=' . g:StslineOnPriColor ' guibg=' . g:StslinePriColor ' gui=bold'
 652    execute 'highlight StslinePriColorFG           guifg=' . g:StslinePriColor   ' guibg=' . g:StslineBackColor
 653    execute 'highlight StslinePriColorFGSecColorBG guifg=' . g:StslinePriColor   ' guibg=' . g:StslineSecColor
 654    execute 'highlight StslineSecColorFGPriColorBG guifg=' . g:StslineSecColor   ' guibg=' . g:StslinePriColor
 655    
 656    if !exists("b:GitBranch") || b:GitBranch == ''
 657    execute 'highlight StslineBackColorFGPriColorBG guifg=' . g:StslineBackColor ' guibg=' . g:StslinePriColor
 658    endif
 659    
 660    endfunction
 661    
 662    
 663    
 664    " Get git branch name
 665    
 666    function! GetGitBranch()
 667    let b:GitBranch=""
 668    try
 669        let l:dir=expand('%:p:h')
 670        let l:gitrevparse = system("git -C ".l:dir." rev-parse --abbrev-ref HEAD")
 671        if !v:shell_error
 672            let b:GitBranch="   ".substitute(l:gitrevparse, '\n', '', 'g')." "
 673            execute 'highlight StslineBackColorFGPriColorBG guifg=' . g:StslineBackColor ' guibg=' . g:StslineSecColor
 674        endif
 675    catch
 676    endtry
 677    endfunction
 678    
 679    
 680    
 681    " Get filetype & custom icon. Put your most used file types first for optimized performance.
 682    
 683    function! GetFileType()
 684    
 685    if &filetype == 'typescript'
 686    let b:FiletypeIcon = ' '
 687    
 688    elseif &filetype == 'html'
 689    let b:FiletypeIcon = ' '
 690    
 691    elseif &filetype == 'scss'
 692    let b:FiletypeIcon = ' '
 693    
 694    elseif &filetype == 'css'
 695    let b:FiletypeIcon = ' '
 696    
 697    elseif &filetype == 'javascript'
 698    let b:FiletypeIcon = ' '
 699    
 700    elseif &filetype == 'javascriptreact'
 701    let b:FiletypeIcon = ' '
 702    
 703    elseif &filetype == 'markdown'
 704    let b:FiletypeIcon = ' '
 705    
 706    elseif &filetype == 'sh' || &filetype == 'zsh'
 707    let b:FiletypeIcon = ' '
 708    
 709    elseif &filetype == 'vim'
 710    let b:FiletypeIcon = ' '
 711    
 712    elseif &filetype == ''
 713    let b:FiletypeIcon = ''
 714    
 715    elseif &filetype == 'rust'
 716    let b:FiletypeIcon = ' '
 717    
 718    elseif &filetype == 'ruby'
 719    let b:FiletypeIcon = ' '
 720    
 721    elseif &filetype == 'cpp'
 722    let b:FiletypeIcon = ' '
 723    
 724    elseif &filetype == 'c'
 725    let b:FiletypeIcon = ' '
 726    
 727    elseif &filetype == 'go'
 728    let b:FiletypeIcon = ' '
 729    
 730    elseif &filetype == 'lua'
 731    let b:FiletypeIcon = ' '
 732    
 733    elseif &filetype == 'haskel'
 734    let b:FiletypeIcon = ' '
 735    
 736    else
 737    let b:FiletypeIcon = '🖊 '
 738    
 739    endif
 740    endfunction
 741    
 742    
 743    
 744    " Get git branch name after entering a buffer
 745    augroup GetGitBranch
 746        autocmd!
 747        autocmd BufEnter * call GetGitBranch()
 748    augroup END
 749    
 750    
 751    " Set active / inactive statusline after entering, leaving buffer
 752    augroup SetStslineline
 753        autocmd!
 754        autocmd BufEnter,WinEnter * call ActivateStatusline()
 755        autocmd BufLeave,WinLeave * call DeactivateStatusline()
 756    augroup END
 757    
 758    " vim: nospell 
───────┴────────────────────────────────────────────────────────────────────────