0
0

Updated nvim colours

This commit is contained in:
Opnxng 2023-11-17 03:02:20 +08:00
parent c5cd8bf6cc
commit 2e42023e9d
2 changed files with 180 additions and 36 deletions

View File

@ -1,50 +1,28 @@
" Basic configurations
set clipboard=unnamedplus
set nocompatible
set novisualbell
syntax on
set encoding=utf-8
set number
set clipboard=unnamedplus
set textwidth=100
set novisualbell
" Set to I-beam cursor
" set guicursor=v-c-sm:block,n-i-ci-ve:ver25,r-cr-o:hor20
" , is leader
let mapleader =","
set guicursor=v-c-sm:block,n-i-ci-ve:ver25,r-cr-o:hor20
" Spell-check set to <leader>o, 'o' for 'orthography':
map <leader>o :setlocal spell! spelllang=en_us<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
set splitbelow splitright
" Enable autocompletion:
set wildmode=longest,list,full
" Disables automatic commenting on newline:
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" Indentations
" set smartindent
" set smarttab
set softtabstop=2
set shiftwidth=2
set expandtab
filetype plugin indent on
" Search and Replace
set ignorecase
set smartcase
set nohlsearch
" set hlsearch
set incsearch
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
set splitbelow splitright
" Remaps for Smart Quit
nnoremap ZZ :w<CR>:SmartQ<CR>
nnoremap ZQ <Plug>(smartq_this)
" Remaps for buffers
nnoremap <C-j> :bprevious<CR>
nnoremap <C-k> :bnext<CR>
nnoremap <leader>b :Buffer<CR>
" Toggle line numbers
" Remaps for line numbers toggle
nmap <C-N><C-N> :set invnumber<CR>
" Other remaps
@ -56,9 +34,42 @@ noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
map <F3> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" . " FG:" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#")<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable autocompletion:
set wildmode=longest,list,full
" Spell-check set to <leader>o, 'o' for 'orthography':
map <leader>o :setlocal spell! spelllang=en_us<CR>
" Disables automatic commenting on newline:
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" Indentations
set softtabstop=2
set shiftwidth=2
set expandtab
filetype plugin indent on
" set smartindent
" set smarttab
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
set splitbelow splitright
" Search and Replace
set ignorecase
set smartcase
set nohlsearch
set incsearch
" set hlsearch
" Edit .j2 as yaml files
au BufNewFile,BufReadPost *.yaml.j2 set filetype=yaml
au BufNewFile,BufReadPost *.yml.j2 set filetype=yaml
" Remove trailing whitespace
autocmd BufWritePre * %s/\s\+$//e
@ -67,6 +78,8 @@ autocmd BufWritePre * %s/\s\+$//e
set list
set listchars=lead,trail,tab:»\ ,extends,precedes,nbsp
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugins
call plug#begin()
Plug 'junegunn/goyo.vim'
@ -77,8 +90,6 @@ call plug#end()
" Smartq
let g:smartq_default_mappings = 0
nnoremap ZZ :w<CR>:SmartQ<CR>
nnoremap ZQ <Plug>(smartq_this)
" Goyo
autocmd vimenter * Goyo 100
@ -103,7 +114,140 @@ endfunction
autocmd! User GoyoEnter call <SID>goyo_enter()
autocmd! User GoyoLeave call <SID>goyo_leave()
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Colours
" Bash
highlight shCmdSubRegion ctermfg=Magenta
highlight shCmdSub ctermfg=Magenta
highlight shCommandSub ctermfg=Magenta
highlight shDerefSimple ctermfg=Brown
highlight shNumber ctermfg=Cyan
highlight shIf ctermfg=Magenta
highlight shElse ctermfg=Magenta
highlight shElif ctermfg=Magenta
highlight shFi ctermfg=Magenta
highlight shFor ctermfg=Magenta
highlight shWhile ctermfg=Magenta
highlight shFunction ctermfg=Magenta
highlight shCase ctermfg=Magenta
highlight shEsac ctermfg=Magenta
highlight shReturn ctermfg=Magenta
highlight shVariable ctermfg=Blue
highlight shString ctermfg=Green
highlight shSpecial ctermfg=Brown
highlight shDerefVar ctermfg=Brown
highlight PreProc ctermfg=Brown
highlight shNumber ctermfg=Cyan
highlight shDanger ctermfg=Red
" Yaml
highlight yamlBlockMappingKey ctermfg=Magenta
highlight yamlKeyValueDelimiter ctermfg=Magenta
highlight yamlBlock ctermfg=Magenta
highlight yamlKey ctermfg=Blue
highlight yamlDoubleQuotedString ctermfg=Cyan
highlight yamlSingleQuotedString ctermfg=Cyan
highlight yamlDocumentHeader ctermfg=Brown
highlight yamlTag cterm=italic
highlight yamlFlowIndicator ctermfg=White
" CSS
highlight cssClassName ctermfg=Magenta
highlight cssIdSelector ctermfg=Magenta
highlight cssAttributeSelector ctermfg=Magenta
highlight cssMediaQuery ctermfg=Blue
highlight cssKeyframeRule ctermfg=Blue
highlight cssAnimationProperty ctermfg=Magenta
highlight cssVariable ctermfg=Blue
highlight cssVendorProperty ctermfg=Brown
highlight cssImportantKeyword ctermfg=Brown
highlight cssFontProp ctermfg=Magenta
highlight cssFontDescriptorProp ctermfg=Magenta
highlight cssAtKeyword ctermfg=Magenta
highlight cssFunctionName ctermfg=Magenta
highlight cssAtRule ctermfg=Blue
highlight cssPseudoClassId ctermfg=Blue
highlight cssSelector cterm=italic
highlight cssProperty cterm=italic
highlight cssValue cterm=italic
highlight cssNumber ctermfg=Cyan
highlight cssTrue ctermfg=Cyan
highlight cssFalse ctermfg=Cyan
highlight cssNull ctermfg=Cyan
highlight cssCustomProp ctermfg=Magenta
highlight cssTextProp ctermfg=DarkYellow
" Python
highlight pythonFunction cterm=italic
highlight pythonClass cterm=italic
highlight pythonMethod cterm=italic
" JavaScript
highlight jsFunction cterm=italic
highlight jsClass cterm=italic
highlight jsMethod cterm=italic
" HTML
highlight htmlTag cterm=italic
highlight htmlAttribute cterm=italic
" Java
highlight javaClass cterm=italic
highlight javaMethod cterm=italic
highlight javaFunction cterm=italic
" Vimscript
highlight vimParen ctermfg=White
highlight vimSep ctermfg=White
highlight vimBraces ctermfg=White
highlight vimFunc ctermfg=Cyan
highlight vimNotation ctermfg=Cyan
highlight vimBracket ctermfg=Cyan
highlight vimMapModKey ctermfg=Cyan
highlight vimSetOption ctermfg=Cyan
highlight vimAutoCommand ctermfg=Cyan
highlight vimUserCommand ctermfg=Cyan
highlight vimCommand ctermfg=Cyan
highlight vimFuncSID ctermfg=Cyan
highlight vimMapKey ctermfg=Cyan
highlight vimOption ctermfg=Blue
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Colours
" Use purple for syntax elements
highlight Keyword ctermfg=Magenta
highlight Statement ctermfg=Magenta
" Use blue for variables
highlight Identifier ctermfg=Blue
highlight Type ctermfg=Blue
highlight Function ctermfg=Blue
" Use teal for numbers and language constants
highlight Number ctermfg=Cyan
highlight Boolean ctermfg=Cyan
highlight Constant ctermfg=Cyan
" Use green for string literals
highlight String ctermfg=Green
" Use orange for special syntax elements
highlight Special ctermfg=Brown
" Use red to highlight errors
highlight Error ctermfg=White ctermbg=Red
highlight Danger ctermfg=White ctermbg=Red
" Use grey for comments
highlight Comment ctermfg=DarkGrey
" Match parentheses
highlight MatchParen ctermfg=White
" Curly braces, square brackets, parentheses
highlight Delimiter ctermfg=White
highlight Indicator ctermfg=White
highlight SpecialChar ctermfg=White
highlight SpecialComment ctermfg=White
" Use italics for computation
highlight yamlKey cterm=italic
highlight yamlValue cterm=italic
highlight yamlAnchor cterm=italic
highlight NonText ctermfg=DarkGrey
highlight SpecialKey ctermfg=DarkGrey
highlight StatusLine ctermbg=White ctermfg=DarkGrey

View File

@ -1,6 +1,6 @@
---
- name: Set up VPS
hosts: all
hosts: oracle,vultr
# gather_facts: true
vars_files:
- vars/secrets.yaml