💾 Archived View for gmi.noulin.net › gitRepositories › systemSetup › file › openbsd › .vimrc.gmi captured on 2024-08-18 at 18:54:51. 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 (5773B)

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