From b6809adf2ae58073b3862f432eb7caad7d35162f Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Sun, 10 Sep 2017 21:22:02 +0100 Subject: [PATCH] initial commit --- vim/.netrwhist | 4 + vim/colors/README.txt | 79 +++++++++++ vim/colors/customred256.vim | 96 ++++++++++++++ vimrc | 253 ++++++++++++++++++++++++++++++++++++ 4 files changed, 432 insertions(+) create mode 100644 vim/.netrwhist create mode 100644 vim/colors/README.txt create mode 100644 vim/colors/customred256.vim create mode 100644 vimrc diff --git a/vim/.netrwhist b/vim/.netrwhist new file mode 100644 index 0000000..d1df77f --- /dev/null +++ b/vim/.netrwhist @@ -0,0 +1,4 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =2 +let g:netrw_dirhist_1='/home/ray/.screenlayout' +let g:netrw_dirhist_2='/home/ray/.config/i3status' diff --git a/vim/colors/README.txt b/vim/colors/README.txt new file mode 100644 index 0000000..8fa6f32 --- /dev/null +++ b/vim/colors/README.txt @@ -0,0 +1,79 @@ +README.txt for color scheme files + +These files are used for the ":colorscheme" command. They appear in the +Edit/Color Scheme menu in the GUI. + + +Hints for writing a color scheme file: + +There are two basic ways to define a color scheme: + +1. Define a new Normal color and set the 'background' option accordingly. + set background={light or dark} + highlight clear + highlight Normal ... + ... + +2. Use the default Normal color and automatically adjust to the value of + 'background'. + highlight clear Normal + set background& + highlight clear + if &background == "light" + highlight Error ... + ... + else + highlight Error ... + ... + endif + +You can use ":highlight clear" to reset everything to the defaults, and then +change the groups that you want differently. This also will work for groups +that are added in later versions of Vim. +Note that ":highlight clear" uses the value of 'background', thus set it +before this command. +Some attributes (e.g., bold) might be set in the defaults that you want +removed in your color scheme. Use something like "gui=NONE" to remove the +attributes. + +In case you want to set 'background' depending on the colorscheme selected, +this autocmd might be useful: + autocmd SourcePre */colors/blue_sky.vim set background=dark +Replace "blue_sky" with the name of the colorscheme. + +In case you want to tweak a colorscheme after it was loaded, check out the +ColorScheme autocmd event. + +To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim", +and use `:runtime` to load the original colorscheme: + " load the "evening" colorscheme + runtime colors/evening.vim + " change the color of statements + hi Statement ctermfg=Blue guifg=Blue + +To see which highlight group is used where, find the help for +"highlight-groups" and "group-name". + +You can use ":highlight" to find out the current colors. Exception: the +ctermfg and ctermbg values are numbers, which are only valid for the current +terminal. Use the color names instead. See ":help cterm-colors". + +The default color settings can be found in the source file src/syntax.c. +Search for "highlight_init". + +If you think you have a color scheme that is good enough to be used by others, +please check the following items: + +- Does it work in a color terminal as well as in the GUI? +- Is "g:colors_name" set to a meaningful value? In case of doubt you can do + it this way: + let g:colors_name = expand(':t:r') +- Is 'background' either used or appropriately set to "light" or "dark"? +- Try setting 'hlsearch' and searching for a pattern, is the match easy to + spot? +- Split a window with ":split" and ":vsplit". Are the status lines and + vertical separators clearly visible? +- In the GUI, is it easy to find the cursor, also in a file with lots of + syntax highlighting? +- Do not use hard coded escape sequences, these will not work in other + terminals. Always use color names or #RRGGBB for the GUI. diff --git a/vim/colors/customred256.vim b/vim/colors/customred256.vim new file mode 100644 index 0000000..382d90e --- /dev/null +++ b/vim/colors/customred256.vim @@ -0,0 +1,96 @@ +" Vim color file + +set bg=dark +hi clear Normal +hi clear +if exists("syntax_on") + syntax reset +endif + +set fillchars=stl:\ ,stlnc:\ ,vert:\ + +let colors_name = "customred256" + + + +hi Normal guifg=#c0c0c0 guibg=#000040 ctermfg=lightyellow ctermbg=16 +hi ErrorMsg guifg=#ffffff guibg=#287eff ctermfg=white ctermbg=lightblue +hi Visual guifg=#8080ff guibg=fg gui=reverse ctermfg=lightblue ctermbg=fg cterm=reverse +hi VisualNOS guifg=#8080ff guibg=fg gui=reverse,underline ctermfg=lightblue ctermbg=fg cterm=reverse,underline +hi Todo guifg=#d14a14 guibg=#1248d1 ctermfg=red ctermbg=darkblue +hi Search guifg=#90fff0 guibg=#2050d0 ctermfg=white ctermbg=darkblue cterm=underline term=underline +hi IncSearch guifg=#b0ffff guibg=#2050d0 ctermfg=darkblue ctermbg=gray + + +hi SpecialKey guifg=cyan ctermfg=33 +hi Directory guifg=cyan ctermfg=255 +hi Title guifg=magenta gui=none ctermfg=198 cterm=bold +hi WarningMsg guifg=red ctermfg=red +hi WildMenu guifg=yellow guibg=black ctermfg=yellow ctermbg=black cterm=none term=none +hi ModeMsg guifg=#22cce2 ctermfg=255 +hi MoreMsg ctermfg=darkgreen ctermfg=darkgreen +hi Question guifg=green gui=none ctermfg=green cterm=none +hi NonText guifg=#0030ff ctermfg=darkblue + + +hi StatusLine guifg=blue guibg=darkgray gui=none ctermfg=255 ctermbg=239 term=none cterm=none +hi StatusLineNC guifg=black guibg=darkgray gui=none ctermfg=238 ctermbg=233 term=none cterm=none +hi VertSplit guifg=black guibg=darkgray gui=none ctermfg=233 ctermbg=233 term=none cterm=none +hi Folded guifg=#808080 guibg=#000040 ctermfg=243 ctermbg=232 cterm=bold term=bold +hi FoldColumn guifg=#808080 guibg=#000040 ctermfg=240 ctermbg=none cterm=bold term=bold +hi LineNr guifg=#90f020 ctermfg=235 ctermbg=none cterm=none +hi EndOfBuffer ctermfg=233 ctermbg=none +hi ColorColumn ctermbg=233 + + +hi DiffAdd guibg=darkblue ctermbg=darkblue term=none cterm=none +hi DiffChange guibg=darkmagenta ctermbg=magenta cterm=none +hi DiffDelete ctermfg=blue ctermbg=cyan gui=bold guifg=Blue guibg=DarkCyan +hi DiffText cterm=bold ctermbg=red gui=bold guibg=Red + + +hi Cursor guifg=black guibg=yellow ctermfg=black ctermbg=yellow +hi lCursor guifg=black guibg=white ctermfg=black ctermbg=white + + + +hi Comment guifg=#80a0ff ctermfg=238 +hi Constant ctermfg=magenta guifg=#ffa0a0 cterm=none +hi Special ctermfg=brown guifg=Orange cterm=none gui=none +hi Identifier ctermfg=cyan guifg=#40ffff cterm=none +hi Statement ctermfg=yellow cterm=none guifg=#ffff60 gui=none +hi PreProc ctermfg=magenta guifg=#ff80ff gui=none cterm=none +hi type ctermfg=green guifg=#60ff60 gui=none cterm=none +hi Underlined cterm=underline term=underline +hi Ignore guifg=bg ctermfg=bg + + + +" suggested by tigmoid, 2008 Jul 18 +hi Pmenu guifg=#c0c0c0 guibg=#404080 +hi PmenuSel guifg=#c0c0c0 guibg=#2050d0 +hi PmenuSbar guifg=blue guibg=darkgray +hi PmenuThumb guifg=#c0c0c0 + + +" Tagbar highlighting +hi TagbarFoldIcon ctermfg=237 + +hi TagbarHelp ctermfg=243 +hi TagbarHelpKey ctermfg=255 +hi TagbarHelpTitle ctermfg=238 + +hi TagbarKind ctermfg=220 +hi TagbarNestedKind ctermfg=214 + +hi TagbarScope ctermfg=220 +hi TagbarType ctermfg=214 +hi TagbarSignature ctermfg=88 +hi TagbarPseudoID ctermfg=160 +hi TagbarHighlight ctermfg=255 ctermbg=245 + +hi TagbarAccessPublic ctermfg=136 +hi TagbarAccessProtected ctermfg=130 +hi TagbarAccessPrivate ctermfg=124 + + diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..c4c7ad5 --- /dev/null +++ b/vimrc @@ -0,0 +1,253 @@ +set nocompatible " be iMproved, required +filetype off " required + +" set the runtime path to include Vundle and initialize +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() +" alternatively, pass a path where Vundle should install plugins +"call vundle#begin('~/some/path/here') + + +" let Vundle manage Vundle, required +Plugin 'VundleVim/Vundle.vim' + + +" The following are examples of different formats supported. +" Keep Plugin commands between vundle#begin/end. +" plugin on GitHub repo +Plugin 'tpope/vim-fugitive' +" plugin from http://vim-scripts.org/vim/scripts.html +" Plugin 'L9' +" Git plugin not hosted on GitHub +" Requires git to be compiled with Ruby support +" Plugin 'git://git.wincent.com/command-t.git' + +" git repos on your local machine (i.e. when working on your own plugin) +"Plugin 'file:///home/gmarik/path/to/plugin' +" The sparkup vim script is in a subdirectory of this repo called vim. +" Pass the path to set the runtimepath properly. + + +" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} +" Install L9 and avoid a Naming conflict if you've already installed a +" different version somewhere else. +" Plugin 'ascenator/L9', {'name': 'newL9'} + + +" Nerdtree and nerdtree-git +Plugin 'scrooloose/nerdtree.git' +Plugin 'Xuyuanp/nerdtree-git-plugin' + + +"css3-syntax +Plugin 'hail2u/vim-css3-syntax.git' + + +"scss-syntax +Plugin 'cakebaker/scss-syntax.vim' + +"bufexplorer +Plugin 'jlanzarotta/bufexplorer' + +"tagbar +Plugin 'majutsushi/tagbar' + +"vim-surround +Plugin 'tpope/vim-surround' + +"undotree +Plugin 'mbbill/undotree' + +" gutentag +Plugin 'ludovicchabant/vim-gutentags' + +" Ctrlp +Plugin 'ctrlpvim/ctrlp.vim' + + +" All of your Plugins must be added before the following line +call vundle#end() " required +filetype plugin indent on " required +" To ignore plugin indent changes, instead use: +"filetype plugin on +" +" Brief help +" :PluginList - lists configured plugins +" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate +" :PluginSearch foo - searches for foo; append `!` to refresh local cache +" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal +" +" see :h vundle for more details or wiki for FAQ +" Put your non-Plugin stuff after this line + + + + +" better window navigaton +nnoremap h +nnoremap l +nnoremap k +nnoremap j + +" better window resizing +" need to use j because urxvt sends the character prefixed with Escape +" instead of setting the eighth bit +" see https://unix.stackexchange.com/a/199705 +nnoremap j :resize +1 +nnoremap k :resize -1 +nnoremap l :vertical resize +1 +nnoremap h :vertical resize -1 + +let mapleader = "\" + +set hidden + +set bg=dark +set number +" set nonumber +set autoindent + +" set width of the fold column to create a margin +set foldcolumn=1 + +hi FoldColumn ctermbg=226 ctermfg=255 +colorscheme customred256 + + + + + + + + +" tagbar styling + + +" set a right margin and it's colour +set colorcolumn=100 + +set foldmethod=manual +" color of indent +" hi Folded ctermfg=7 +" hi Folded ctermbg=233 " not working - investigate +"augroup OpenAllFoldsOnFileOpen +" autocmd! +" autocmd BufRead * normal zR +"augroup END + +syntax on +" tabs +set tabstop=2 +set softtabstop=2 +set shiftwidth=0 "use tabstop value +set mouse=a + +set t_Co=8 +set t_Sf=[3%p1%dm +set t_Sb=[4%p1%dm + +nnoremap :set invpaste paste? +set pastetoggle= +set showmode + + +" fix higlight problems such as vertical-align etc +augroup VimCSS3Syntax + autocmd! + + autocmd FileType css setlocal iskeyword+=- +augroup END + + + +" Automatically reload .vimrc if chanaged +augroup myvimrc + au! + au BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif +augroup END + + + +" plugins stuff + +" NERDtree +nnoremap :NERDTreeFocus +nnoremap nt :NERDTreeFocus +" allow closing if only window open is a NERDTree +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + +" TagBar +nnoremap tb :TagbarOpen fj + + +" tagbar css/scss thingy +nnoremap ] :tag /[.#@]=expand('') + + +" bufexploer +nnoremap be :BufExplorer + +nnoremap ut :UndotreeToggle +" let g:tagbar_type_css = { +" \ 'ctagstype' : 'css', +" \ 'kinds' : [ +" \ 'c:classes', +" \ 'i:ids', +" \ 't:tags', +" \ 'm:medias' +" \ ] +" \} + +let g:tagbar_type_scss = { +\ 'ctagstype' : 'scss', +\ 'kinds' : [ +\ 'v:variables', +\ 'c:classes', +\ 'i:ids', +\ 't:tags', +\ 'd:medias', +\ 'm:mixins', +\ 'f:functions' +\ ] +\} + +if !exists("*RangerExplorer") + function RangerExplorer() + exec "silent !ranger --choosefile=/tmp/vim_ranger_current_file " . expand("%:p:h") + if filereadable('/tmp/vim_ranger_current_file') + exec 'edit ' . system('cat /tmp/vim_ranger_current_file') + call system('rm /tmp/vim_ranger_current_file') + endif + redraw! + endfun + map ra :call RangerExplorer() +endif + + + + + +" ze end + + + + + + + + + + + + + + + + + + + + + + +