diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-04-26 08:33:18 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-04-26 08:33:18 +0200 |
| commit | 36c19a33127316bea52d46130d53035a328eb1c5 (patch) | |
| tree | 0f1bce632a140226d8bd1b1d0376d6bac38d6e43 | |
| parent | 5828534933ffd5ca23c6e47b7c12a4a2637e01f0 (diff) | |
| download | dotfiles-36c19a33127316bea52d46130d53035a328eb1c5.tar.gz dotfiles-36c19a33127316bea52d46130d53035a328eb1c5.tar.bz2 dotfiles-36c19a33127316bea52d46130d53035a328eb1c5.zip | |
Change colorscheme to solarized and switched to st
| -rw-r--r-- | .pluggins.vim | 15 | ||||
| -rw-r--r-- | .vimrc | 51 | ||||
| -rw-r--r-- | .zsh_aliases | 1 | ||||
| -rw-r--r-- | xmonad.hs | 2 |
4 files changed, 43 insertions, 26 deletions
diff --git a/.pluggins.vim b/.pluggins.vim index 9289f7f..d3f66ea 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -4,17 +4,18 @@ call plug#begin() Plug 'tpope/vim-eunuch' " basic unix command in vim Plug 'tomtom/tcomment_vim' " mininal commenter Plug 'itchyny/lightline.vim' " minimal status bar - Plug 'unblevable/quick-scope' " highlight first char to jump to word - - " bloat?? - Plug 'romainl/vim-cool' " disable highlight after search - Plug 'justinmk/vim-syntax-extra' " better syntax highlight Plug 'sheerun/vim-polyglot' " better syntax highlight " s19 at home Plug 'pbondoer/vim-42header' " 42 header " themes - Plug 'joshdick/onedark.vim' " onedark - Plug 'dracula/vim', {'as': 'vim'} " dracula + " Plug 'joshdick/onedark.vim' " onedark + " Plug 'dracula/vim', {'as': 'vim'} " dracula + Plug 'altercation/vim-colors-solarized' " solarized + + " intresting but not used + " Plug 'unblevable/quick-scope' " highlight first char to jump to word + " Plug 'romainl/vim-cool' " disable highlight after search + " Plug 'justinmk/vim-syntax-extra' " better syntax highlight call plug#end() @@ -15,7 +15,7 @@ let mapleader = ' ' " set leader key to space let maplocalleader = '-' " set file local leader key to backslash set nocompatible " not compatible with vi set number " line number -set relativenumber " line number relative to cursor +" set relativenumber " line number relative to cursor set numberwidth=1 " line numbers gutter autowidth set cursorline " highlight current line set noshowmatch " dont jump to pair bracket @@ -74,18 +74,26 @@ set nofoldenable " not folded by default """"""""""""""" " one {{{ -let g:onedark_terminal_italics=1 -colorscheme onedark +" let g:onedark_terminal_italics=1 +" colorscheme onedark " }}} " dracula {{{ -let g:dracula_bold = 1 -let g:dracula_italic = 1 -let g:dracula_colorterm = 0 +" let g:dracula_bold = 1 +" let g:dracula_italic = 1 +" let g:dracula_colorterm = 0 " colorscheme dracula " }}} +" solarized {{{ +set t_Co=16 +let g:solarized_termcolors=16 +let g:solarized_visibility='low' " visibility of invisible chars with set list +set background=dark +colorscheme solarized +" }}} " lightline {{{ let g:lightline = {} -let g:lightline.colorscheme = 'jellybeans' " lightline theme to onedark +let g:lightline.colorscheme = 'solarized' " lightline theme to solarized +" let g:lightline.colorscheme = 'jellybeans' " lightline theme to onedark " }}} @@ -144,7 +152,7 @@ nnoremap <leader>src :source $MYVIMRC<cr> " c {{{ " create c function body from prototype -nnoremap gcf A<BS><CR>{<CR><CR>}<CR><ESC>j +nnoremap gcf A<BS><CR>{<CR><CR>}<ESC>j " initialise a school header file function PutHeaderBoilerPlate() @@ -156,22 +164,27 @@ function PutHeaderBoilerPlate() endfunction nnoremap gch :Stdheader<CR>:call PutHeaderBoilerPlate()<CR> -function PutCoplienForm(name) +" put semicolon at the end of line +nnoremap <leader>; mqA;<ESC>`q +" doxygen format comments +autocmd Filetype c setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +autocmd Filetype cpp setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +" }}} + +" cpp {{{ +" Put Coplien Form boilerplate class +function PutCoplienFormFunc(name) let l:default_constructor = a:name . "();\n" - let l:copy_constructor = a:name . "(" . a:name . " const& other);\n" - let l:copy_operator = "void operator=(" . a:name . " const& other);\n" + let l:copy_constructor = a:name . "(const " . a:name . "& other);\n" + let l:copy_operator = a:name . "& operator=(const " . a:name . "& other);\n" let l:destructor = "~" . a:name . "();\n" execute "normal iclass " . a:name . "\n{\npublic:\n" . l:default_constructor . l:copy_constructor . l:copy_operator . l:destructor . "\nprivate:\n};\n" execute "normal <2{" endfunction -command! PutCoplienFormFile call PutCoplienForm(split(expand('%:t'), '\.')[0]) - -" put semicolon at the end of line -nnoremap <leader>; mqA;<ESC>`q -" doxygen format comments -autocmd Filetype c setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ -autocmd Filetype cpp setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +" Put Coplien Form boilerplate according to filename +command! PutCoplienFormFile call PutCoplienFormFunc(split(expand('%:t'), '\.')[0]) +command! -nargs=1 PutCoplienForm call PutCoplienFormFunc("<args>") " }}} " quickfix window toggle {{{ @@ -205,6 +218,8 @@ autocmd BufWritePre * %s/\s\+$//e " real tab in c file for school projects autocmd BufReadPre,BufNewFile *.h,*.c set filetype=c autocmd Filetype c setlocal noexpandtab +" std::cout << ... << std::endl; shortcut +autocmd Filetype cpp nnoremap <leader>cout istd::cout << << std::endl;<ESC>2F<hi " vim fold method to marker autocmd Filetype vim setlocal foldmethod=marker " }}} diff --git a/.zsh_aliases b/.zsh_aliases index b40891a..2ae7101 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -52,6 +52,7 @@ alias glgo="git log --oneline --no-decorate" alias gp="git push" alias gcl="git clone --recurse-submodules" alias gst="git status" +alias gs="git status" alias gss="git status --short" alias gco="git checkout" alias gsta="git stash push" @@ -12,7 +12,7 @@ import XMonad.Layout.NoBorders main = do xmonad $ desktopConfig { modMask = mod4Mask -- mod key to super - , terminal = "konsole" + , terminal = "st" , borderWidth = 1 , focusFollowsMouse = False -- don't change window based on mouse position (need to click) , normalBorderColor = "#292d3e" |
