💾 Archived View for gmi.noulin.net › gitRepositories › systemSetup › file › dotfiles › .vimrc.gmi captured on 2023-07-10 at 15:44:57. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

systemSetup

Log

Files

Refs

README

LICENSE

.vimrc (5916B)

     1 " in /etc/vim/vimrc.local - set nocompatible              " be iMproved, required
     2 filetype off                  " required
     3 " set the runtime path to include Vundle and initialize
     4 set rtp+=~/.vim/bundle/Vundle.vim
     5 call vundle#begin()
     6 " alternatively, pass a path where Vundle should install plugins
     7 "call vundle#begin('~/some/path/here')
     8 
     9 " let Vundle manage Vundle, required
    10 Plugin 'gmarik/Vundle.vim'
    11 
    12 " Add plugins below
    13 
    14 " vim-easymotion
    15 Plugin 'Lokaltog/vim-easymotion'
    16 
    17 " vim-fugitive
    18 Plugin 'tpope/vim-fugitive'
    19 
    20 " nerdtree
    21 Plugin 'scrooloose/nerdtree'
    22 
    23 " tcomment_vim
    24 Plugin 'tomtom/tcomment_vim'
    25 
    26 " vim-surround
    27 Plugin 'tpope/vim-surround'
    28 
    29 " vim-jade
    30 Plugin 'digitaltoad/vim-jade'
    31 
    32 " vim-coffee-script
    33 Plugin 'kchmck/vim-coffee-script'
    34 
    35 " vim-javascript
    36 Plugin 'pangloss/vim-javascript'
    37 
    38 " SnipMate
    39 Plugin 'MarcWeber/vim-addon-mw-utils'
    40 Plugin 'tomtom/tlib_vim'
    41 Plugin 'garbas/vim-snipmate'
    42 
    43 " Optional
    44 Plugin 'honza/vim-snippets'
    45 
    46 " Tabular
    47 Plugin 'godlygeek/tabular'
    48 
    49 " Conque-GDB
    50 " doesnt work in debian buster - Plugin 'vim-scripts/Conque-GDB'
    51 
    52 " minibufferexplorer
    53 " NO - problem with syntax highlighting - Plugin 'weynhamz/vim-plugin-minibufexpl'
    54 " help:
    55 " https://github.com/weynhamz/vim-plugin-minibufexpl/blob/master/doc/minibufexpl.txt
    56 
    57 " old gcc c11 compile error - Plugin 'Valloric/YouCompleteMe'
    58 
    59 Plugin 'jreybert/vimagit'
    60 
    61 " Plugin 'vim-ctrlspace/vim-ctrlspace'
    62 
    63 Plugin 'vim-scripts/a.vim'
    64 
    65 Plugin 'Raimondi/delimitMate'
    66 
    67 Plugin 'vim-syntastic/syntastic'
    68 
    69 Plugin 'tomtom/quickfixsigns_vim'
    70 
    71 Plugin 'airblade/vim-gitgutter'
    72 
    73 " easytags is slow on large projects
    74 " vim becomes unresponsive (even with async)
    75 Plugin 'xolox/vim-misc'
    76 Plugin 'xolox/vim-easytags'
    77 
    78 Plugin 'majutsushi/tagbar'
    79 
    80 Plugin 'mbbill/undotree'
    81 
    82 Plugin 'vim-scripts/highlight.vim'
    83 
    84 " Plugin 'junegunn/goyo.vim'
    85 
    86 " Plugin 'junegunn/limelight.vim'
    87 
    88 Plugin 'junegunn/vim-easy-align'
    89 
    90 Plugin 'junegunn/fzf'
    91 Plugin 'junegunn/fzf.vim'
    92 
    93 Plugin 'posva/vim-vue'
    94 
    95 Plugin 'vim-scripts/Align'
    96 
    97 Plugin 'calleerlandsson/pick.vim'
    98 
    99 let g:ConqueTerm_Color = 2         " 1: strip color after 200 lines, 2: always with color
   100 let g:ConqueTerm_CloseOnEnd = 1    " close conque when program ends running
   101 let g:ConqueTerm_StartMessages = 0 " display warning messages if conqueTerm is configured incorrectly
   102 
   103 " All of your Plugins must be added before the following line
   104 call vundle#end()            " required
   105 filetype plugin indent on    " required
   106 " To ignore plugin indent changes, instead use:
   107 "filetype plugin on
   108 "
   109 " Brief help
   110 " :PluginList       - lists configured plugins
   111 " :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
   112 " :PluginSearch foo - searches for foo; append `!` to refresh local cache
   113 " :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
   114 "
   115 " see :h vundle for more details or wiki for FAQ
   116 " Put your non-Plugin stuff after this line
   117 
   118 " Pathogen
   119 "execute pathogen#infect()
   120 
   121 " show white spaces and end of line, enable: set list, disable: set nolist
   122 set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
   123 set list
   124 
   125 " setup tabs and spaces
   126 set tabstop=2
   127 set shiftwidth=2
   128 set expandtab
   129 
   130 
   131 map <C-n> :NERDTreeToggle<CR>
   132 
   133 
   134 
   135 let g:EasyMotion_do_mapping = 0 " Disable default mappings
   136 "+2 char
   137 " Bi-directional find motion
   138 " Jump to anywhere you want with minimal keystrokes, with just one key binding.
   139 " `s{char}{label}`
   140 "nmap s <Plug>(easymotion-s)
   141 " or
   142 " `s{char}{char}{label}`
   143 " Need one more keystroke, but on average, it may be more comfortable.
   144 nmap s <Plug>(easymotion-s2)
   145 
   146 " Turn on case insensitive feature
   147 let g:EasyMotion_smartcase = 1
   148 
   149 " JK motions: Line motions
   150 map <Leader>j <Plug>(easymotion-j)
   151 map <Leader>k <Plug>(easymotion-k)
   152 
   153 nnoremap <C-Left> :tabprevious<CR>
   154 nnoremap <C-Right> :tabnext<CR>
   155 
   156 " fold coffee files
   157 autocmd BufNewFile,BufReadPost *.coffee setl foldmethod=indent foldenable
   158 source ~/.vim/plugin/v.vim
   159 set ruler
   160 " remove space at line end
   161 autocmd BufWritePre * %s/\s\+$//e
   162 
   163 " Return to last edit position when opening files
   164 autocmd BufReadPost *
   165      \ if line("'\"") > 0 && line("'\"") <= line("$") |
   166      \   exe "normal! g`\"" |
   167      \ endif
   168 
   169 set path+=**
   170 set wildmenu
   171 " enable word wrap
   172 set linebreak
   173 " set visual mode selection highlighting
   174 highlight Visual cterm=reverse ctermbg=NONE
   175 
   176 " ctrl space
   177 "set hidden
   178 "set showtabline=0
   179 "let g:CtrlSpaceLoadLastWorkspaceOnStart = 1
   180 "let g:CtrlSpaceSaveWorkspaceOnSwitch = 1
   181 "let g:CtrlSpaceSaveWorkspaceOnExit = 1
   182 
   183 " quickfixsigns
   184 nnoremap <F12> :QuickfixsignsToggle<cr>
   185 
   186 
   187 " vim-easytags
   188 let g:easytags_async = 1
   189 
   190 " tagbar
   191 nmap <F8> :TagbarToggle<CR>
   192 
   193 " syntastic toggle
   194 nnoremap <F11> :SyntasticToggleMode<cr>
   195 
   196 " undotree
   197 nnoremap <F5> :UndotreeToggle<cr>
   198 
   199 " display status line and filename
   200 set statusline=%f%m%r%h%w\ [%n]\ %=%4v,%4l\ of\ %L
   201 set laststatus=2
   202 
   203 " syntastic
   204 set statusline+=%#warningmsg#
   205 set statusline+=%{SyntasticStatuslineFlag()}
   206 set statusline+=%*
   207 
   208 let g:syntastic_always_populate_loc_list = 1
   209 let g:syntastic_auto_loc_list = 1
   210 let g:syntastic_check_on_open = 1
   211 let g:syntastic_check_on_wq = 0
   212 
   213 " press f to show function name in C programs
   214 fun! ShowFuncName()
   215   let lnum = line(".")
   216   let col = col(".")
   217   echohl ModeMsg
   218   echo getline(search("^[^ \t#/]\\{2}.*[^:]\s*$", 'bW'))
   219   echohl None
   220   call search("\\%" . lnum . "l" . "\\%" . col . "c")
   221 endfun
   222 map f :call ShowFuncName() <CR>
   223 
   224 " <F2> to show function declaration under cursor
   225 nnoremap <F2> [i
   226 inoremap <F2> <Esc>[i
   227 
   228 " <F4> to save current file
   229 nnoremap <F4> :w<CR>
   230 inoremap <F4> <c-o>:w<CR>
   231 
   232 " ; for commands
   233 nnoremap ; :
   234 
   235 imap <F1> <Esc>`^
   236 vmap <F1> <Esc>`^
   237 imap jk <Esc>`^
   238 vmap ` <Esc>
   239 nmap <Return> i
   240 " paste last yanked
   241 nnoremap \ "0p
   242 nnoremap \| "0P
   243 
   244 set pastetoggle=<f3>
   245 nnoremap <F9> :tabprev<CR>
   246 inoremap <F9> <c-o>:tabprev<CR>
   247 nnoremap <F10> :tabnext<CR>
   248 inoremap <F10> <c-o>:tabnext<CR>
   249 nnoremap <F7> :q<CR>
   250 nnoremap <S-F7> :qa<CR>
   251 nnoremap <C-F7> :qa!<CR>
   252 nnoremap <F6> :call PickFile()<CR>