diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish index d7a7d70..84f9151 100644 --- a/.config/fish/functions/fish_prompt.fish +++ b/.config/fish/functions/fish_prompt.fish @@ -1,11 +1,12 @@ function fish_prompt set test $status + set dir (prompt_pwd) set_color -o green echo -n (hostname) set_color normal echo -n ':' set_color -o blue - prompt_pwd | tr -d '\n' + echo -n $dir set_color normal echo -n " $test\$ " end diff --git a/.vimrc b/.vimrc index 0e0a2f5..af6eeb1 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,4 @@ +" Basic configuration if &compatible set nocompatible " Be iMproved set modelines=0 @@ -20,44 +21,58 @@ Plugin 'Valloric/YouCompleteMe' "Plugin 'Shougo/neocomplete.vim' "Plugin 'lyuts/vim-rtags' "Plugin 'JBakamovic/cxxd-vim' +"Plugin 'neoclide/coc.nvim' -"Plugin 'KabbAmine/zeavim.vim' -"Plugin 'Shougo/neosnippet-snippets' -"Plugin 'Shougo/neosnippet.vim' -"Plugin 'Shougo/vimproc.vim' -"Plugin 'andymass/vim-matchup' " Improve if-else matches -"Plugin 'apalmer1377/factorus' doesn't work witch c++ -"Plugin 'easymotion/vim-easymotion' -"Plugin 'fholgado/minibufexpl.vim' ctrl-p ctrl-f -"Plugin 'gabrielelana/vim-markdown' -"Plugin 'idanarye/vim-vebugger' :Termdebug -"Plugin 'jeaye/color_coded' -Plugin 'jez/vim-superman' "vman application -"Plugin 'metakirby5/codi.vim' +" Mappings "Plugin 'milkypostman/vim-togglelist' " Map of quickfix toggles -"Plugin 'mnpk/vim-jira-complete' -"Plugin 'pelodelfuego/vim-swoop' -"Plugin 'quark-zju/vim-cpp-auto-include' + +" Code development helpers "Plugin 'rhysd/vim-clang-format' -"Plugin 'scrooloose/nerdtree' -"Plugin 'tpope/vim-commentary' " Toggle C style comments with gc -"Plugin 'tpope/vim-fugitive' " Git integration -"Plugin 'vim-airline/vim-airline' -"Plugin 'vim-scripts/CycleColor' -"Plugin 'vim-scripts/DoxygenToolkit.vim' " Doxygen support +"Plugin 'quark-zju/vim-cpp-auto-include' +Plugin 'tpope/vim-commentary' " Toggle C style comments with gc +"Plugin 'mnpk/vim-jira-complete' +Plugin 'KabbAmine/zeavim.vim' " gz to open zeal + +" Files switch, jump and grep-like tools +"Plugin 'ericcurtin/CurtineIncSw.vim' "Toggle .c .h files "Plugin 'vim-scripts/a.vim' Curtine is the new a.vim -"Plugin 'vim-scripts/taglist.vim' +"Plugin 'scrooloose/nerdtree' +Plugin 'mileszs/ack.vim' " Ack integration +"Plugin 'jremmen/vim-ripgrep' +Plugin 'ctrlpvim/ctrlp.vim' +"Plugin 'junegunn/fzf.vim' +"Plugin 'fholgado/minibufexpl.vim +Plugin 'justinmk/vim-sneak' " easy movement +"Plugin 'easymotion/vim-easymotion' +Plugin 'ludovicchabant/vim-gutentags' "Auto generate tags +Plugin 'andymass/vim-matchup' " Improve if-else matches +Plugin 'vim-scripts/taglist.vim' + +" Git integration "Plugin 'airblade/vim-gitgutter' " Mark edited lines Plugin 'mhinz/vim-signify' " Mark edited lines - faster gitgutter -Plugin 'ctrlpvim/ctrlp.vim' -"Plugin 'ericcurtin/CurtineIncSw.vim' "Toggle .c .h files -Plugin 'flazz/vim-colorschemes' " lots of colorschemes -Plugin 'justinmk/vim-sneak' " easy movement -Plugin 'kergoth/vim-bitbake' " Bitbake templates and syntax -Plugin 'ludovicchabant/vim-gutentags' "Auto generate tags -Plugin 'mileszs/ack.vim' " Ack integration Plugin 'rhysd/git-messenger.vim' " show git history +"Plugin 'tpope/vim-fugitive' " Git integration + +" Syntax for random filetypes +"Plugin 'gabrielelana/vim-markdown' +Plugin 'kergoth/vim-bitbake' " Bitbake templates and syntax +"Plugin 'vim-scripts/DoxygenToolkit.vim' " Doxygen support + +" Colorschemes +Plugin 'flazz/vim-colorschemes' " lots of colorschemes +"Plugin 'vim-scripts/CycleColor' +"Plugin 'jeaye/color_coded' + +" Other plugins (external tools, etc) +"Plugin 'Shougo/vimproc.vim' +Plugin 'junegunn/goyo.vim' +Plugin 'jez/vim-superman' "vman application Plugin 'vimwiki/vimwiki' +"Plugin 'metakirby5/codi.vim' " live coding +"Plugin 'pelodelfuego/vim-swoop' " editing in parallel +"Plugin 'vim-airline/vim-airline' + call vundle#end() " required " ========== Vim Basic Settings =============" @@ -69,6 +84,8 @@ set tabstop=4 set shiftwidth=4 set softtabstop=4 +set expandtab + " More Common Settings. set encoding=utf-8 set scrolloff=10 @@ -219,17 +236,8 @@ endif "let g:miniBufExplModSelTarget = 1 "let g:miniBufExplStatusLineText = '' -" Tab color settings to make it more visible. -hi MBEChanged ctermfg=white -hi MBENormal ctermfg=white - " Tagbar key bindings." -"nmap t :TagbarToggle -"imap t :TagbarTogglei "nmap t :TlistToggle -"imap t :TagbarTogglei - -map a gg0VG$ nnoremap 2 :set tabstop=2 softtabstop=2 shiftwidth=2 nnoremap 4 :set tabstop=4 softtabstop=4 shiftwidth=4 @@ -330,11 +338,16 @@ let g:ycm_min_num_of_chars_for_completion = 99 map :colorscheme random +function! FoldFormat() + let foldsize = (v:foldend - v:foldstart) + return ">>>\t".getline(v:foldstart)."\t\t\t(".foldsize."\tmore lines)" +endfunction + " Folding - space one line, home,end globally increase/decrease set foldenable set foldlevelstart=3 set foldnestmax=5 -set foldtext=getline(v:foldstart) +set foldtext=FoldFormat() set fillchars=fold:\ set foldmethod=syntax nnoremap za @@ -363,77 +376,6 @@ set updatetime=4000 inoremap :w :wi -"let g:clang_format#code_style = "WebKit" -let g:clang_format#command = "clang-format" -"let g:clang_format#auto_format_on_insert_leave = 1 -"let g:clang_format#auto_format = 1 - -let g:clang_format#style_options = { - \ "AccessModifierOffset" : -4, - \ "AlignAfterOpenBracket" : "false", - \ "AlignConsecutiveAssignments" : "false", - \ "AlignEscapedNewlinesLeft" : "false", - \ "AlignOperands" : "false", - \ "AlignTrailingComments" : "false", - \ "AllowAllParametersOfDeclarationOnNextLine" : "true", - \ "AllowShortBlocksOnASingleLine" : "false", - \ "AllowShortCaseLabelsOnASingleLine" : "false", - \ "AllowShortFunctionsOnASingleLine" : "All", - \ "AllowShortIfStatementsOnASingleLine" : "false", - \ "AllowShortLoopsOnASingleLine" : "false", - \ "AlwaysBreakAfterDefinitionReturnType" : "None", - \ "AlwaysBreakBeforeMultilineStrings" : "false", - \ "AlwaysBreakTemplateDeclarations" : "false", - \ "BinPackArguments" : "true", - \ "BinPackParameters" : "true", - \ "BreakBeforeBinaryOperators" : "All", - \ "BreakBeforeBraces" : "Stroustrup", - \ "BreakBeforeTernaryOperators" : "true", - \ "BreakConstructorInitializersBeforeComma" : "true", - \ "ColumnLimit" : 0, - \ "ConstructorInitializerAllOnOneLineOrOnePerLine" : "false", - \ "ConstructorInitializerIndentWidth" : 4, - \ "ContinuationIndentWidth" : 4, - \ "Cpp11BracedListStyle" : "false", - \ "DerivePointerAlignment" : "false", - \ "DisableFormat" : "false", - \ "ExperimentalAutoDetectBinPacking" : "false", - \ "IndentCaseLabels" : "false", - \ "IndentWidth" : "4", - \ "IndentWrappedFunctionNames" : "false", - \ "KeepEmptyLinesAtTheStartOfBlocks" : "true", - \ "MaxEmptyLinesToKeep" : "1", - \ "NamespaceIndentation" : "Inner", - \ "ObjCBlockIndentWidth" : "4", - \ "ObjCSpaceAfterProperty" : "true", - \ "ObjCSpaceBeforeProtocolList" : "true", - \ "PenaltyBreakBeforeFirstCallParameter" : "19", - \ "PenaltyBreakComment" : "300", - \ "PenaltyBreakFirstLessLess" : "120", - \ "PenaltyBreakString" : "1000", - \ "PenaltyExcessCharacter" : "1000000", - \ "PenaltyReturnTypeOnItsOwnLine" : "60", - \ "PointerAlignment" : "Left", - \ "SpaceAfterCStyleCast" : "false", - \ "SpaceBeforeAssignmentOperators" : "true", - \ "SpaceBeforeParens" : "ControlStatements", - \ "SpaceInEmptyParentheses" : "false", - \ "SpacesBeforeTrailingComments" : 1, - \ "SpacesInAngles" : "false", - \ "SpacesInContainerLiterals" : "true", - \ "SpacesInCStyleCastParentheses" : "false", - \ "SpacesInParentheses" : "false", - \ "SpacesInSquareBrackets" : "false", - \ "Standard" : "Cpp03", - \ "TabWidth" : 8, - \ "UseTab" : "Never"} - - -"let g:vebugger_leader='d' -"let g:vebugger_path_gdb='/home/kmir/ARM-TOOLCHAIN/cross/bin/arm-none-eabi-gdb' - -set expandtab - "nnoremap :silent ! plantuml %:p && eog -g %:p:r.png &:redraw! " ctrlp configuration @@ -499,9 +441,9 @@ function! FindAlternate() if (l:curr_ext == 'c') let l:ext = 'h' elseif (l:curr_ext == 'cpp') - let l:ext = 'hpp' + let l:ext = 'h' elseif (l:curr_ext == 'h') - let l:ext = 'c' + let l:ext = 'cpp' elseif (l:curr_ext == 'hpp') let l:ext = 'cpp' endif @@ -514,3 +456,57 @@ nnoremap :call FindAlternate() "map :call CurtineIncSw() packadd termdebug + + +"set shortmess+=c +"inoremap coc#refresh() +"set signcolumn=yes +"set cmdheight=2 +"inoremap +" \ pumvisible() ? "\" : +" \ check_back_space() ? "\" : +" \ coc#refresh() +"inoremap pumvisible() ? "\" : "\" +" +"function! s:check_back_space() abort +" let col = col('.') - 1 +" return !col || getline('.')[col - 1] =~# '\s' +"endfunction +" +"inoremap pumvisible() ? "\" : "\u\" +" +"nmap gd (coc-definition) +"nmap gy (coc-type-definition) +"nmap gi (coc-implementation) +"nmap gr (coc-references) +" +"nnoremap K :call show_documentation() +" +"function! s:show_documentation() +" if (index(['vim','help'], &filetype) >= 0) +" execute 'h '.expand('') +" else +" call CocAction('doHover') +" endif +"endfunction +" +"autocmd CursorHold * silent call CocActionAsync('highlight') +"xmap f (coc-format-selected) +"nmap f (coc-format-selected) +" +"" Show all diagnostics +"nnoremap a :CocList diagnostics +"" Manage extensions +"nnoremap e :CocList extensions +"" Show commands +"nnoremap c :CocList commands +"" Find symbol of current document +"nnoremap o :CocList outline +"" Search workspace symbols +"nnoremap s :CocList -I symbols +"" Do default action for next item. +"nnoremap j :CocNext +"" Do default action for previous item. +"nnoremap k :CocPrev +"" Resume latest coc list +"nnoremap p :CocListResume