Skip to content

Instantly share code, notes, and snippets.

@Starsign68
Created May 28, 2021 01:25
Show Gist options
  • Save Starsign68/b5dc44ba3477b1c93332aa638fcf01e7 to your computer and use it in GitHub Desktop.
Save Starsign68/b5dc44ba3477b1c93332aa638fcf01e7 to your computer and use it in GitHub Desktop.
My best one yet
echo("| 2021-05-26 | Starsign68 |")
let mapleader = " "
let localleader = ''
let g:netrw_banner = 0
let g:netrw_liststyle = 0
set termencoding=utf-8
let g:doSmartTab='N' " {{{{STATUSLIME_START}
let g:currentmode = { 'n': 'NORMAL', 'no': 'N·OP·PEND', 'v': 'VISUAL', 'V': 'V·LINE', '': 'V·BLOCK', 's': 'SELECT', 'S': 'S·LINE', '': 'S·BLOCK', 'i': 'INSERT', 'R': 'REPLACE', 'Rv': 'V·REPLACE', 'c': 'COMMAND', 'cv': 'VIM EX', 'ce': 'EX', 'r': 'PROMPT', 'rm': 'MORE', 'r?': 'CONFIRM', '!': 'SHELL', 't': 'TERMINAL'}
let g:modegroups = { 'n': 'NORMAL', 'no': 'NORMAL', 'v': 'VISUAL', 'V': 'VISUAL', '': 'VISUAL', 's': 'OTHER', 'S': 'OTHER', '': 'OTHER', 'i': 'INSERT', 'R': 'INSERT', 'Rv': 'INSERT', 'c': 'OTHER', 'cv': 'OTHER', 'ce': 'OTHER', 'r': 'OTHER', 'rm': 'OTHER', 'r?': 'OTHER', '!': 'OTHER', 't': 'OTHER'}
function! Modetheme(group)
if g:modegroups[mode()]==a:group
let g:colthm = g:currentmode[mode()]
let g:limeModes = g:colthm
return " ".g:limeModes." "
else
return ''
endif
endfunction
set statusline= " Init.
set statusline+=%3*%{(Modetheme('NORMAL'))} " Color
set statusline+=%7*%{(Modetheme('VISUAL'))} " Color
set statusline+=%5*%{(Modetheme('INSERT'))} " Color
set statusline+=%1*%{(Modetheme('OTHER'))} " Color
set statusline+=%1* " Color
set statusline+=%{&paste?'\ PST':''} " Paste
set statusline+=%{&spell?'\ SPL':''} " Spell
set statusline+=\ " Space
set statusline+=%(%8*%m%1*\ %) " Modified [+] / [-] flag
set statusline+=[%Y] " File type
set statusline+=\ %t " Short file name
set statusline+=%1* " Color
set statusline+=%= " Right align
set statusline+=%1* " Color
set statusline+=\ " Space
set statusline+=[%{strftime(\"%H:%M\")}]\ " Time
set statusline+=[%1.5l:%1.5L] " [%3p%%] " {STATUSLIME_END}}}} {{{{SETTINGS_START}
filetype plugin indent on " Enable filetype-specific settings.
set guicursor=n-v-c:block-Cursor/lCursor,ve:ver15-Cursor,o:hor15-Cursor,
set guicursor+=i-ci:ver12-Cursor/lCursor,r-cr:hor20-Cursor/lCursor,
set guicursor+=sm:block-Cursor/lcursor
set backspace=indent,start,eol " Use a normal bacspace, not a deadkey
set hidden " Hide instead of delete
set noshowmode " Don't show the mode when status line shows it
set number " Show line numbers
set noshowcmd " Don't show the CMD
set linebreak " Break lines at word (requires Wrap lines)
set showbreak=\|\ " Wrap-broken line prefix
set textwidth=150 " Line wrap (number of cols)
set showmatch " Highlight matching brace
set visualbell " Use visual bell (no beeping)
set noswapfile " Save some space
set incsearch " Searches for strings incrementally
set shiftwidth=3 " Number of auto-indent spaces
set smartindent " Enable smart-indent
set smarttab " Enable smart-tabs
set expandtab " Use space, not tab
set wildmenu " GOOD COMPLETE {SETTINGS_END}}}} {{{{TRIGGERS_START}
augroup cline
au!
au WinLeave,InsertEnter * set nocursorline
au VimEnter,WinEnter,InsertLeave * set cursorline
augroup END
augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
augroup END
aug COLOR
au!
au ColorScheme,FocusGained * hi StatuslineNC cterm=reverse gui=reverse
au ColorScheme,FocusGained * hi User1 cterm=bold ctermfg=30 ctermbg=254 guifg=#2E3440 guibg=#5C6370 gui=bold,standout
au ColorScheme,FocusGained * hi User2 cterm=bold ctermfg=246 ctermbg=251 guifg=#909090 guibg=#c8c8c8 gui=bold
au ColorScheme,FocusGained * hi User3 cterm=bold ctermfg=30 ctermbg=254 guifg=#2E3440 guibg=#AFE805 gui=bold
au ColorScheme,FocusGained * hi User4 cterm=bold ctermfg=30 ctermbg=254 guifg=#ECEFF4 guibg=#8BB804 gui=bold
au ColorScheme,FocusGained * hi User5 cterm=bold ctermfg=166 ctermbg=254 guifg=#2E3440 guibg=#F59C00 gui=bold
au ColorScheme,FocusGained * hi User6 cterm=bold ctermfg=166 ctermbg=254 guifg=#ECEFF4 guibg=#FF6B12 gui=bold
au ColorScheme,FocusGained * hi User7 cterm=bold ctermfg=166 ctermbg=254 guifg=#2e3440 guibg=#3BC8F7 gui=bold
au ColorScheme,FocusGained * hi User8 cterm=bold ctermfg=166 ctermbg=254 guifg=#ECEFF4 guibg=#037499 gui=bold
aug END " {TRIGGERS_END}}}} {{{{THEME_START}
syntax on
set termguicolors
let g:tokyonight_style = 'night' " available: night, storm
let g:tokyonight_disable_italic = 1
let g:tokyonight_cursor = 'blue'
colorscheme tokyonight
set background=dark " {THEME_END}}}}
iabbrev ddate <C-R>=strftime("%Y-%m-%d")<CR>
nnoremap <F1> :set guifont=:h14<CR>
nnoremap <S-F1> :set guifont=:h15<CR>
nnoremap <F2> :e home/web_user/.vim/vimrc<CR>
nnoremap <S-F2> :w<CR> :so home/web_user/.vim/vimrc<CR>
nnoremap <F3> :w<CR> :so %<CR>
nnoremap <S-F3> :w<CR> :export %<CR>
nnoremap <left> <nop>
nnoremap <right> <nop>
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap Q @@
noremap <leader>yo "*y
nnoremap <leader>po "*p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment