" Title......: .vimrc " Description: My setting file for vim " Author.....: Mitchell Johnston " Updated....: Wed 01 May 2024 10:18:30 AM CDT " " Reference " ========= " " Macros " j gj Allows scroll down in sentence by line " k gk Allows scroll up in sentence by line " \b Markdown __bold__ word " \i Markdown _italic_ word " \e Open tab with emoji " \l Run dictionary lookup script (default to lookup word under cursor) " \N Toggle line numbers " \n Scratch Pad " \s Search KJV " \S Toggle spell check " \t Term in split window " \T Term in a Tab " \v Open .vimrc in new tab, sources when saved " \pb Paragraph style=blue " \py Paragraph style=yellow " \pr Paragraph style=red " \pg Paragraph style=green " \wa Bash Cookbook " \wb Bash Quick ref " Control and Alt Key mappings " A-g Mark class=green " A-r Mark class=red " C-b Mark class=blue " C-t Toggle Terminal " C-y Mark class=yellow " F-Keys " F2 New tab Netrw " F3 Get URLS in current buffer (uses youtube-dl) " F4 - autocomplete, backward Insert mode " F5 - autocomplete, forward Insert mode " F6 Replace current line with kjv output " F7 Replace current line with formated output for file under /var/www (mp4 or " picture) " F8 Replace current line with link to file unde /var/www " F9 Run ./compiler in current directory " F12 Open file current buffer " S-F12 Open file new tab " :Commands " :Plug{tab} Plugin manager " :term Open a split window term " :TableModeToggle VIM Table Mode toggle " Typing savers " ============== " urls ab _Bible [Bible](/bible/) ab _crn http://crn.hopto.org/ ab _email mitch@crn.hopto.org ab _gop gopher://crn.hopto.org ab _Jesus [Jesus](/Jesus) ab _kjv [KJV](/#kjv) ab _mykjv [MyKJV](https://mykjv.com/) " dates ab _date =strftime("%a %b %d %Y") ab _time =strftime("%T") ab _u Updated: =strftime('%A %m/%d/%y') " admonitions ab _? :question: ab _! :exclamation: __Important:__ ab _ao 🎧 __Audio Only__ ab _bl 🀬 __Warning bad language__ ab _c :computer: __Code:__ ab _ch :chart_with_upwards_trend: _Chart Of The Day:_ ab _d πŸ₯΅ __Warning Disturbing__ ab _geek 🧠 __Geek Related:__ ab _k :key: ab _l πŸ”— __Links:__ ab _memo :memo: __Note:__ ab _mw πŸ€“ ___Must Watch___ ab _rl :+1: __Rule of Thumb__ ab _tip :bulb: __Tip:__ ab _up πŸ”§ __Updates:__ ab _warn :warning: __Warning:__ " misc ab --- [πŸ”](#)
ab --1
ab --2
ab --3
ab --p
ab _L - [πŸ”— title](link){target="blank"} [=strftime("%X %Z")] ab _mj Mitchell Johnston - UID 0 ab _nl :newspaper: __News Links:__ ab _ts :mortar_board: [__Theological Seminary Of The Air__](/mp3/ruckman/theologic-seminary-of-the-air/) ab _tb {target="blank"} ab _div
ab _re Related: ab _U ab _u i ab _vc ab _iframe ab _Iframe " Offsite ab _dk - [πŸ”— The David Knight Show](http://www.thedavidknightshow.com/){target="blank"} ab _rc - [Rain Country](https://rumble.com/c/RainCountryHomestead) ab _rg - [πŸ”— ReallyGraceful](https://rumble.com/user/reallygraceful){target="blank"} " On-site ab _addict - [🎬 More on Addiction](/archives/health/addiction/) ab _arc - [🎬 For more content check the archives](/archives/) ab _ba - [πŸ’» Bible Analyzer](/archives/bible-analyzer) ab _berg - [🎬 More from Dr Berg](/archives/health/dr-berg/) ab _bio - [🎬 More Biography](/archives/biography/) ab _cooper - [🎬 More from Bill Cooper](/archives/bill-cooper/) ab _covid - [🎬 More on Covid](/archives/health/covid/) ab _cr - [🎬 More from James Corbett](/archives/corbett/) ab _cults - [🎬 More Cults](/archives/cults/) ab _dental - [🎬 More on Dental](/archives/health/dental/) ab _detox - [🎬 More on Detox](health/#detox) ab _diet - [🎬 More on Diet](/archives/health/diet/) ab _env - [🎬 More Environment](/archives/environment/) ab _flat - [🎬 More Flat Earth](/archives/flat/) ab _gatto - [🎬 More from John Talor Gatto](/archives/john-t-gatto/) ab _gear - [🎬 More Gear](/archives/gear/) ab _geg - [🎬 More from G.Edward Griffin](/archives/g-edward-griffin/) ab _gr - [🎬 More from Gail Riplinger](/archives/riplinger/) ab _garden - [🎬 More Gardening](/archives/prep/garden/) ab _hemp - [🎬 More from Hemp](/archives/health/remedies/hemp/) ab _history - [🎬 More history](/archives/history/) ab _law - [🎬 More Law](/archives/law/) ab _larkin - [🎬 More from Larkin Rose](/archives/larkin/) ab _levy - [🎬 More from Dr Thomas Levy](/archives/health/dr-thomas-levy/) ab _mica - [🎬 More from Mica Colston](/archives/mica-colston/) ab _min [🎬 More Minerals](/include/vids/health/minerals/) ab _money - [🎬 More money](/archives/money/) ab _mp3 - [🎧 MP3 Files](/mp3) ab _ortho - [🎬 More Orthomolecular Medicine](/include/vids/health/orthomolecular/) ab _pics - [🎨 More Pictures](/pics) ab _radio - [🎬 More on Radio](/archives/gear/radio/) ab _rem - [🎬 More Remedies](/include/vids/health/remedies/) ab _mms - [🎬 More MMS](/include/vids/health/remedies/mms) ab _ruckman - [🎬 More from Peter Ruckman](/archives/ruckman/) ab _sam - [🎬 More from Dr Sam Bailey](/archives/health/dr-sam-bailey/) ab _sircus - [🎬 More from Dr Mark Sircus](/archives/health/dr-mark-sircus/) ab _save - [πŸ”— Salvation (forgiveness)](/salvation) ab _selft - [🎬 More on Self Therapy](/archives/health/self-therapy/) ab _spy - [🎬 More Spying](/archives/spying/) ab _survive - [🎬 More on Survival](/archives/survive/) ab _tea - [🎬 More on Tea](/include/vids/health/remedies/tea/) ab _vernon - [🎬 More from Dr Vernon Coleman](/archives/health/vernon/) " Create task, check off, uncheck (see my .bashrc functions 'today' & 'task') ab ,c - [ ] map ,x :s/\[ \]/\[❌\] " Complted map ,X :s/\[❌\]/\[ \] " Unmark completed map ,i :s/\[ \]/\[πŸ”¨\] " In progress map ,I :s/\[πŸ”¨\]/\[ \] " Unmark In progress map ,o :s/\[ \]/\[β­•\] " Outsourced map ,O :s/\[β­•\]/\[ \] " Unmark Outsourced " Settings " ======== set cryptmethod=blowfish " use blowfish encryption for encrytped files set switchbuf=usetab " when switching buffers, include tabs set splitright " create vertical splits to the right set splitbelow " create horizontal splits below set formatoptions=croq " c=autowrap comments, r=continue comment on , " o=continue comment on o or O, q=allow format comment with gqgq set backspace=2 " allow backspacing over everything in insert mode " Folds set foldenable " Enable folding set foldmethod=indent " Folding based on markers set foldlevelstart=10 " open most folds by default set foldnestmax=10 " 10 nested fold max " Tabs set hardtabs=4 " Tab setups set tabstop=4 set shiftwidth=4 set expandtab " tab to spaces set softtabstop=4 " number of spaces in tab when editing set tabpagemax=15 " Max number of tabs displayed set showtabline=2 " always display tab line " Completion set dictionary+=~/etc/words-alpha.txt "Ctr-n, Ctr-p word complete set complete+=k set ignorecase " On searches set infercase set autoindent " Good for codding set smartindent " Turn on file typed indenting set shiftround " When shifting lines, round the indentation to the nearest multiple of β€œshiftwidth.” set history=50 " keep 50 lines of command line history set laststatus=2 " Make sure the status line is always displayed set nocompatible " Better for Vim features set shell=/bin/bash " Set default shell set scrolloff=0 " Start scrolling when I'm 3 lines from top/bottom set backspace=indent,eol,start "Allow backspacing over indention, line breaks and insertion start set lbr! " wrap on words set formatoptions+=j " Delete comment characters when joining lines. set spell " Turn on spell check set belloff=all " Display "set nu " turn on line numbers set ruler " Display ruler set showcmd " Show commands set showmatch " Show matching brackets set showmode " Display what mode you are in set cursorline " highlight current line set wildmenu " visual autocomplete for command menu "set list " show hidden characters set listchars=eol:Β¬,tab:β†’β†’,trail:.,extends:>,precedes:< set autoread " Search set path+=** " :find {file} supports wilecard set wildmenu " tab completetion set hlsearch " Highlight search matches set smartcase " Turn off ignorcase if caps is used set incsearch " search as characters are entered " netrw setting let g:netrw_liststyle = 3 let ghregex='\(^\|\s\s\)\zs\.\S\+' let g:netrw_list_hide=ghregex " backup files set viminfo='1000,f1,<500 " File information to Keep set backup "Turn on backups set backupdir=~/.vim/backup/ "The place to remove files after I make big errors, not that I ever do that set backupskip=/tmp/*,~/.vim/backup/* set writebackup "Make backup before overwriting the current buffer set backupcopy=yes "Overwrite the original backup file au BufWritePre * let &bex = '@' . strftime("%F.%H:%M") " Keep undo history across sessions by storing it in a file if has('persistent_undo') call system('mkdir ~/.vim/undo') set undodir=~/.vim/undo/ set undofile set undolevels=1000 set undoreload=10000 endif " Vim-plug if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif " Plugins will be downloaded under the specified directory. call plug#begin('~/.vim/plugged') " Declare the list of plugins. Plug 'marcopaganini/termschool-vim-theme' Plug 'junegunn/fzf' Plug 'junegunn/fzf.vim' Plug 'katono/rogue.vim' Plug 'dhruvasagar/vim-table-mode' Plug 'hallison/vim-markdown' Plug 'ap/vim-css-color' "Vim Rogue options let g:rogue#name = 'Mitch' let g:rogue#directory = '/home/mitch/etc' let g:rogue#jump = '1' let g:rogue#tombstone = '1' let g:rogue#fruit = 'Grapes' " enable this plugin for filetypes, '*' for all files. let g:apc_enable_ft = {'text':1, 'markdown':1, 'php':1} " List ends here. Plugins become visible to Vim after this call. call plug#end() " File types " ========== augroup configgroup autocmd! autocmd BufNewFile,BufFilePre,BufRead *.md set filetype=markdown autocmd BufNewFile,BufFilePre,BufRead *.txt set filetype=txt autocmd FileType make setlocal noexpandtab autocmd BufEnter Makefile setlocal noexpandtab autocmd BufEnter *.sh setlocal tabstop=2 autocmd BufEnter *.sh setlocal shiftwidth=2 autocmd BufEnter *.sh setlocal softtabstop=2 au BufNewFile,BufRead *conkyrc* set filetype=conkyrc autocmd bufwritepost .vimrc source $MYVIMRC autocmd bufwritepost sp.md :!pandoc sp.md -o sp.html augroup END " Display setup " ============== colorscheme termschool :set guioptions-=r "remove right-hand scroll bar set background=dark " Modify for dark background "set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [POS=%04l,%04v][%p%%]\ [LEN=%L] "au InsertEnter * hi StatusLine term=reverse ctermbg=5 gui=undercurl guisp=Magenta "au InsertLeave * hi StatusLine term=reverse ctermfg=0 ctermbg=2 gui=bold,reverse " using Source Code Pro set anti enc=utf-8 set guifont=Source\ Code\ Pro\ 16 filetype plugin on syntax on set conceallevel=2 " Set style for spelling errors hi clear SpellBad hi SpellBad cterm=reverse hi SpellBad gui=reverse " Macros " ====== map j gj map k gk map a A [AW](#archaic) [NA](#names)0n map l :term ++close lu map N :set nu! rnu! map pb 0i

A

map pg 0i

A

map pr 0i

A

map py 0i

A

map qn :tabedit ~/Documents/jots/scratch.md " vim-powered terminal in split window map t :term ++close tmap t :term ++close " vim-powered terminal in new tab map T :tab term ++close tmap T :tab term ++close map v :tabedit $MYVIMRC map wb :!epy ~/Documents/books/tech/dev-bash/bash-pocket-reference.epub map wh :!epy ~/Documents/books/tech/dev-web/oreilly-html-and-css-the-good-parts-by-the-good-parts.epub noremap za " space open/closes folds noremap H :set hlsearch! " HTML " ---- " Highlite in blue (Ruckman) or yellow (mine) or green X-ref map 0iA03j map 0iA03j map 0iA0 map 0iA0 " Function keys " ------------- " Explorer in newtab map :tabe . map! :tabe . " This calls my download manager. I make a list in vim, hit F3 and it downloads them. map :w ~/Downloads/get.txt:term ++close /home/mitch/bin/get -d> " F4 - autocomplete, backward Insert mode inoremap " F5 - autocomplete, forward Insert mode inoremap " This allows me to insert a Bible quote in to a document. map 0D:.!kjv map! 0D:.!kjv " pi take the name of a mp4 or picture file under /var/www and will return html with png " created for a markdown document. map 0D:.!pi map! 0D:.!pi " mkln is "make link" will return markdown formated link with emoji for major " file types, and will auto-local file under /var/www. map 0D:.!mkln map! 0D:.!mkln " Run external compiler (used for CRN’s AV Bible) map :w:term ++close ./compile " Place holder " Open file in current buffer or a new tab via netrw map j:r !./ab map! :Files ~ " Easy tab navigation nnoremap 1 1gt nnoremap 2 2gt nnoremap 3 3gt nnoremap 4 4gt nnoremap 5 5gt nnoremap 6 6gt nnoremap 7 7gt nnoremap 8 8gt nnoremap 9 9gt " ===== new status line ==== "" 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. " Images - https://www.reddit.com/r/vim/comments/ld8h2j/i_made_a_status_line_from_scratch_no_plugins_used/ " I have used Nerd icon fonts. Icons won't work without them. https://github.com/ryanoasis/nerd-fonts/ " This statusline looks exactly like Vim Airline (even more customizable & powerful) & loads faster than Vim airline. Only take few ms to load. " STARTUP TIME - With Vim Airline - ~250ms. With this statusline - ~100ms. Without any statusline - ~98ms. " 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. " e.g. source "~/.config/vim/statusline.vim" " Color highlighting groups " Add this AFTER `colorscheme` option in your vimrc. Otherwise your colorscheme will clear this highlightings. OR use ColorScheme autocommand. VERY IMPORTANT. " Color pallet " Green - #2BBB4F (BG) - #080808 (FG) " Blue - #4799EB " Violet - #986FEC " Yellow - #D7A542 " Orange - #EB754D " Grey1 - #202020 " Grey - #303030 " Define color variables let g:StslineColorGreen = "#2BBB4F" let g:StslineColorBlue = "#4799EB" let g:StslineColorViolet = "#986FEC" let g:StslineColorYellow = "#D7A542" let g:StslineColorOrange = "#EB754D" let g:StslineColorLight = "#C0C0C0" let g:StslineColorDark = "#080808" let g:StslineColorDark1 = "#181818" let g:StslineColorDark2 = "#202020" let g:StslineColorDark3 = "#303030" " Define colors let g:StslineBackColor = g:StslineColorDark2 let g:StslineOnBackColor = g:StslineColorLight "let g:StslinePriColor = g:StslineColorGreen let g:StslineOnPriColor = g:StslineColorDark let g:StslineSecColor = g:StslineColorDark3 let g:StslineOnSecColor = g:StslineColorLight " Create highlight groups execute 'highlight StslineSecColorFG guifg=' . g:StslineSecColor ' guibg=' . g:StslineBackColor execute 'highlight StslineSecColorBG guifg=' . g:StslineColorLight ' guibg=' . g:StslineSecColor execute 'highlight StslineBackColorBG guifg=' . g:StslineColorLight ' guibg=' . g:StslineBackColor execute 'highlight StslineBackColorFGSecColorBG guifg=' . g:StslineBackColor ' guibg=' . g:StslineSecColor execute 'highlight StslineSecColorFGBackColorBG guifg=' . g:StslineSecColor ' guibg=' . g:StslineBackColor execute 'highlight StslineModColorFG guifg=' . g:StslineColorYellow ' guibg=' . g:StslineBackColor " Statusline " Enable statusline set laststatus=2 " Disable showmode - i.e. Don't show mode like --INSERT-- in current statusline. set noshowmode " 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.). set termguicolors " Understand statusline elements " %{StslineMode()} = Output of a function " %#StslinePriColorBG# = Highlight group " %F, %c, etc. are variables which contain value like - current file path, current colums, etc. " %{&readonly?\"ο€£\ \":\"\"} = If file is readonly ? Then "Lock icon" Else : "Nothing" " %{get(b:,'coc_git_status',b:GitBranch)} = If b:coc_git_status efists, then it's value, else value of b:GitBranch " &filetype, things starting with & are also like variables with info. " \ - Is for escaping a space. \" is for escaping a double quote. " %{&fenc!='utf-8'?\"\ \":''} = If file encoding is NOT!= 'utf-8' ? THEN output a "Space" else : no character " Define active statusline function! ActivateStatusline() call GetFileType() 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\ endfunction " Define Inactive statusline function! DeactivateStatusline() if !exists("b:GitBranch") || b:GitBranch == '' 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\ else 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\ endif endfunction " Get Statusline mode & also set primary color for that mode function! StslineMode() let l:CurrentMode=mode() if l:CurrentMode==#"n" let g:StslinePriColor = g:StslineColorGreen let b:CurrentMode = "NORMAL " elseif l:CurrentMode==#"i" let g:StslinePriColor = g:StslineColorViolet let b:CurrentMode = "INSERT " elseif l:CurrentMode==#"c" let g:StslinePriColor = g:StslineColorYellow let b:CurrentMode = "COMMAND " elseif l:CurrentMode==#"v" let g:StslinePriColor = g:StslineColorBlue let b:CurrentMode = "VISUAL " elseif l:CurrentMode==#"V" let g:StslinePriColor = g:StslineColorBlue let b:CurrentMode = "V-LINE " elseif l:CurrentMode==#"\" let g:StslinePriColor = g:StslineColorBlue let b:CurrentMode = "V-BLOCK " elseif l:CurrentMode==#"R" let g:StslinePriColor = g:StslineColorViolet let b:CurrentMode = "REPLACE " elseif l:CurrentMode==#"s" let g:StslinePriColor = g:StslineColorBlue let b:CurrentMode = "SELECT " elseif l:CurrentMode==#"t" let g:StslinePriColor =g:StslineColorYellow let b:CurrentMode = "TERM " elseif l:CurrentMode==#"!" let g:StslinePriColor = g:StslineColorYellow let b:CurrentMode = "SHELL " endif call UpdateStslineColors() return b:CurrentMode endfunction " Update colors. Recreate highlight groups with new Primary color value. function! UpdateStslineColors() execute 'highlight StslinePriColorBG guifg=' . g:StslineOnPriColor ' guibg=' . g:StslinePriColor execute 'highlight StslinePriColorBGBold guifg=' . g:StslineOnPriColor ' guibg=' . g:StslinePriColor ' gui=bold' execute 'highlight StslinePriColorFG guifg=' . g:StslinePriColor ' guibg=' . g:StslineBackColor execute 'highlight StslinePriColorFGSecColorBG guifg=' . g:StslinePriColor ' guibg=' . g:StslineSecColor execute 'highlight StslineSecColorFGPriColorBG guifg=' . g:StslineSecColor ' guibg=' . g:StslinePriColor if !exists("b:GitBranch") || b:GitBranch == '' execute 'highlight StslineBackColorFGPriColorBG guifg=' . g:StslineBackColor ' guibg=' . g:StslinePriColor endif endfunction " Get git branch name function! GetGitBranch() let b:GitBranch="" try let l:dir=expand('%:p:h') let l:gitrevparse = system("git -C ".l:dir." rev-parse --abbrev-ref HEAD") if !v:shell_error let b:GitBranch="  ".substitute(l:gitrevparse, '\n', '', 'g')." " execute 'highlight StslineBackColorFGPriColorBG guifg=' . g:StslineBackColor ' guibg=' . g:StslineSecColor endif catch endtry endfunction " Get filetype & custom icon. Put your most used file types first for optimized performance. function! GetFileType() if &filetype == 'typescript' let b:FiletypeIcon = ' ' elseif &filetype == 'html' let b:FiletypeIcon = ' ' elseif &filetype == 'scss' let b:FiletypeIcon = 'ξ˜ƒ ' elseif &filetype == 'css' let b:FiletypeIcon = 'ο‡Ό ' elseif &filetype == 'javascript' let b:FiletypeIcon = ' ' elseif &filetype == 'javascriptreact' let b:FiletypeIcon = ' ' elseif &filetype == 'markdown' let b:FiletypeIcon = 'ξ˜‰ ' elseif &filetype == 'sh' || &filetype == 'zsh' let b:FiletypeIcon = 'ξž• ' elseif &filetype == 'vim' let b:FiletypeIcon = 'ξŸ… ' elseif &filetype == '' let b:FiletypeIcon = '' elseif &filetype == 'rust' let b:FiletypeIcon = ' ' elseif &filetype == 'ruby' let b:FiletypeIcon = 'ξž‘ ' elseif &filetype == 'cpp' let b:FiletypeIcon = ' ' elseif &filetype == 'c' let b:FiletypeIcon = ' ' elseif &filetype == 'go' let b:FiletypeIcon = ' ' elseif &filetype == 'lua' let b:FiletypeIcon = ' ' elseif &filetype == 'haskel' let b:FiletypeIcon = ' ' else let b:FiletypeIcon = 'πŸ–Š ' endif endfunction " Get git branch name after entering a buffer augroup GetGitBranch autocmd! autocmd BufEnter * call GetGitBranch() augroup END " Set active / inactive statusline after entering, leaving buffer augroup SetStslineline autocmd! autocmd BufEnter,WinEnter * call ActivateStatusline() autocmd BufLeave,WinLeave * call DeactivateStatusline() augroup END " vim: nospell