this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Reorganize vim configuration

+145 -164
+1
nvim/.gitignore
··· 1 + autoload/plug.vim*
-4
nvim/after/ftplugin/help.vim
··· 1 1 nnoremap <buffer> <CR> <C-]> 2 2 nnoremap <buffer> <BS> <C-T> 3 - nnoremap <buffer> o /'\l\{2,\}'<CR> 4 - nnoremap <buffer> O ?'\l\{2,\}'<CR> 5 - nnoremap <buffer> s /\|\zs\S\+\ze\|<CR> 6 - nnoremap <buffer> S ?\|\zs\S\+\ze\|<CR>
+1 -1
nvim/after/ftplugin/html.vim
··· 1 1 setlocal omnifunc=htmlcomplete#CompleteTags 2 2 3 - let g:html_indent_inctags = "html,body,head,tbody" 3 + let g:html_indent_inctags = 'html,body,head,tbody'
-13
nvim/after/syntax/haskell.vim
··· 1 - syntax match hsNiceOperator "\\\ze[[:alpha:][:space:]_([]" conceal cchar=λ 2 - 3 - syntax match hsNiceOperator "<-" conceal cchar=← 4 - syntax match hsNiceOperator "->" conceal cchar=→ 5 - syntax match hsNiceOperator "=>" conceal cchar=⇒ 6 - syntax match hsNiceOperator "\:\:" conceal cchar=∷ 7 - 8 - syntax match hsNiceOperator "\.\." conceal cchar=… 9 - 10 - syntax match hsNiceOperator "\<Bool\>" conceal cchar=𝔹 11 - syntax match hsNiceOperator "\<Rational\>" conceal cchar=ℚ 12 - syntax match hsNiceOperator "\<Integer\>" conceal cchar=ℤ 13 - syntax match hsNiceOperator "\<Double\>" conceal cchar=𝔻
+31 -108
nvim/init.vim
··· 1 - " vim: foldmethod=marker foldlevel=0 foldenable 1 + scriptencoding utf-8 2 2 3 3 let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1 4 - let $EDITOR="nvr" 4 + let $EDITOR='nvr' 5 5 6 6 " Plugins {{{ 7 - let s:plugins = filereadable(expand("~/.config/nvim/autoload/plug.vim", 1)) 7 + let s:plugins = filereadable(expand($HOME . '/.config/nvim/autoload/plug.vim', 1)) 8 8 if !s:plugins 9 - silent call mkdir(expand("~/.config/nvim/autoload", 1), 'p') 10 - exe '!curl -fLo '.expand("~/.config/nvim/autoload/plug.vim", 1) 9 + silent call mkdir(expand($HOME . '/.config/nvim/autoload', 1), 'p') 10 + exe '!curl -fLo '.expand($HOME . '/.config/nvim/autoload/plug.vim', 1) 11 11 \ .' https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 12 12 endif 13 13 ··· 15 15 16 16 " Visual 17 17 Plug 'ap/vim-buftabline' 18 - Plug 'cocopon/iceberg.vim' 18 + Plug 'chriskempson/base16-vim' 19 19 20 20 " Languages 21 - Plug 'sheerun/vim-polyglot' 21 + Plug 'rust-lang/rust.vim' 22 22 Plug 'dag/vim-fish' 23 23 Plug 'hauleth/vim-ketos' 24 24 Plug 'slashmili/alchemist.vim' 25 25 26 26 " Git 27 27 Plug 'mhinz/vim-signify' 28 - Plug 'tpope/vim-fugitive' 29 - Plug 'junegunn/gv.vim' 28 + Plug 'tpope/vim-fugitive' | 29 + \ Plug 'junegunn/gv.vim' 30 30 31 31 " Fuzzy find 32 - Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } 33 - Plug 'junegunn/fzf.vim' 32 + Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' } | 33 + \ Plug 'junegunn/fzf.vim' 34 34 35 35 " File management 36 36 Plug 'justinmk/vim-dirvish' 37 37 Plug 'tpope/vim-eunuch' 38 38 39 39 " Completion 40 + Plug 'ludovicchabant/vim-gutentags' 40 41 Plug 'racer-rust/vim-racer' 41 - Plug 'ludovicchabant/vim-gutentags' 42 42 43 43 " Code manipulation 44 + Plug 'jiangmiao/auto-pairs' 44 45 Plug 'tommcdo/vim-exchange' 46 + Plug 'tommcdo/vim-lion' 45 47 Plug 'tpope/vim-commentary' 48 + Plug 'tpope/vim-endwise' 46 49 Plug 'tpope/vim-surround' 47 - Plug 'jiangmiao/auto-pairs' 48 - Plug 'tpope/vim-endwise' 49 - Plug 'tpope/vim-rails' 50 50 51 51 " Build & Configuration 52 - Plug 'benekastah/neomake' 52 + Plug 'tpope/vim-dispatch' | 53 + \ Plug 'radenling/vim-dispatch-neovim' 53 54 Plug 'tpope/vim-projectionist' 55 + " Plug 'w0rp/ale' 56 + Plug 'w0rp/ale' 54 57 55 58 " Utils 56 - Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' } 59 + Plug 'kopischke/vim-fetch' 57 60 Plug 'mjbrownie/swapit' 58 61 Plug 'tpope/vim-repeat' 59 62 Plug 'tpope/vim-unimpaired' 60 - Plug 'wellle/targets.vim' 61 - Plug 'mhinz/vim-grepper' 62 63 63 64 call plug#end() 64 65 " }}} 65 66 " Colors {{{ 66 67 set termguicolors 67 68 set background=dark 68 - colorscheme iceberg 69 + colorscheme base16-ocean 69 70 " }}} 70 71 " User interface {{{ 71 72 " Ignore all automatic files and folders ··· 98 99 set iskeyword+=- 99 100 100 101 " Show 80 column 101 - let &colorcolumn="81,+" . join(range(1,200), ',+') 102 + let &colorcolumn='81,+' . join(range(1,200), ',+') 102 103 set cursorline 103 104 104 - set splitright 105 - set splitbelow 105 + " set belloff=all 106 106 107 - set timeoutlen=500 107 + set splitright splitbelow 108 108 " }}} 109 109 " Identation {{{ 110 110 set shiftwidth=2 ··· 138 138 set undolevels=-1 139 139 set undoreload=-1 140 140 else 141 - if !isdirectory($HOME . "/.cache/backups") 141 + if !isdirectory($HOME . '/.cache/backups') 142 142 silent !mkdir -p ~/.cache/backups > /dev/null 2>&1 143 143 endif 144 - let &undodir=$HOME . "/.cache/backups" 144 + let &undodir=$HOME . '/.cache/backups' 145 145 set undofile 146 146 set undolevels=1000 147 147 set undoreload=10000 ··· 151 151 " Leader {{{ 152 152 let mapleader = "\<space>" 153 153 " }}} 154 - " Store relative line number jumps in the jumplist {{{ 155 - " Treat long lines as break lines (useful when moving around in them). 156 - noremap <expr> j v:count > 1 ? 'm`' . v:count . 'j' : 'gj' 157 - noremap <expr> k v:count > 1 ? 'm`' . v:count . 'k' : 'gk' 158 - " }}} 159 154 " Disable arrows {{{ 160 155 noremap <up> <nop> 161 156 noremap <down> <nop> ··· 166 161 noremap! <left> <nop> 167 162 noremap! <right> <nop> 168 163 " }}} 169 - " Swap 'go to marker' mappings {{{ 170 - nnoremap ' ` 171 - nnoremap ` ' 172 - " }}} 173 164 " Smart <Home> and `^` {{{ 174 165 " <Home> goes to the beginning of the text on first press and to the beginning 175 166 " of the line on second press. It alternates afterwards. 176 167 nnoremap <expr> ^ virtcol('.') - 1 <= indent('.') && col('.') > 1 ? '0' : '_' 177 - nmap <Home> ^ 178 - " }}} 179 - " Reselect last Visual {{{ 180 - nnoremap gV `[v`] 181 168 " }}} 182 169 " File closing {{{ 183 170 nnoremap ZS :wa<CR> ··· 199 186 nnoremap <leader><leader> :<C-u>Files<CR> 200 187 nnoremap <leader>b :<C-u>Buffers<CR> 201 188 " }}} 202 - " UndoTree {{{ 203 - noremap <F2> :<C-u>UndotreeToggle<CR> 204 - " }}} 205 189 " Format {{{ 206 190 noremap g= gg=Gg`` 207 191 noremap Q gq 208 192 " }}} 209 193 " Search {{{ 210 194 " Easier change and replace word 211 - nnoremap c. *Ncgn 212 - 213 195 nnoremap <leader>, :nohlsearch<CR> 214 196 nnoremap <C-c> <C-c>:nohlsearch<CR> 215 - 216 - " Search for selection 217 - vnoremap // y/<C-r>"<CR> 218 - " }}} 219 - " Git {{{ 220 - nnoremap U <nop> 221 - nnoremap Us :<C-u>Gstatus<CR> 222 - nnoremap Up :<C-u>Git push<CR> 223 - nnoremap Ud :<C-u>Gdiff<CR> 224 - nnoremap UB :<C-u>Gblame<CR> 225 - nnoremap Uc :<C-u>Gcommit<CR> 226 - nnoremap Um :<C-u>Gmerge<CR> 227 - nnoremap Uu :<C-u>Git pull --all<CR> 228 - nnoremap Uf :<C-u>GitFiles<CR> 229 - nnoremap Ul :<C-u>GV<CR> 230 - nnoremap UL :<C-u>GV!<CR> 231 - nmap UU Uu 232 197 " }}} 233 198 " Tabs {{{ 234 199 nnoremap <C-w>t :<C-u>tabnew <bar> Dirvish<CR> 235 200 nnoremap ]w gt 236 201 nnoremap [w gT 237 202 " }}} 238 - " Yank to the end of line {{{ 239 - nnoremap Y y$ 240 - " }}} 241 - " Terminal {{{ 242 - nnoremap <C-q>c :<C-u>term<CR> 243 - nnoremap <C-q>s :<C-u>split <bar> term<CR> 244 - nnoremap <C-q>v :<C-u>vsplit <bar> term<CR> 245 - 246 - tnoremap <C-q><C-q> <C-\><C-n> 247 - " }}} 248 203 " }}} 249 204 " Configuration {{{ 250 - " Grep {{{ 251 - if executable('rg') 252 - set grepformat^=%f:%l:%c:%m 253 - set grepprg=rg\ --vimgrep 254 - endif 255 - " }}} 256 205 " Unload unneeded plugins {{{ 257 206 let g:loaded_netrw = 1 258 207 let g:loaded_netrwPlugin = 1 259 208 let g:loaded_vimballPlugin = 1 260 209 " }}} 261 210 " Formatting & Cleaning {{{ 262 - command! Clean let _s=@/ | %s/\s\+$//e | let @/=_s | set nohlsearch 263 - " }}} 264 - " Neomake {{{ 265 - augroup syntax_check 266 - au! 267 - autocmd BufWritePost * silent if !&diff | Neomake | endif 268 - augroup END 269 - 270 - let g:neomake_warning_sign = { 271 - \ 'text': '‼', 272 - \ 'texthl': 'Warning', 273 - \ } 211 + command! Clean let _s = @/ | %s/\s\+$//e | let @/ = _s | set nohlsearch 274 212 " }}} 275 213 " Signify {{{ 276 214 let g:signify_sign_add = '▌' ··· 281 219 282 220 let g:signify_sign_show_count = 0 283 221 " }}} 284 - " Terminal colors {{{ 285 - let g:terminal_color_0 = "#2a3158" 286 - let g:terminal_color_1 = "#e27878" 287 - let g:terminal_color_2 = "#89b8c2" 288 - let g:terminal_color_3 = "#e4aa80" 289 - let g:terminal_color_4 = "#84a0c6" 290 - let g:terminal_color_5 = "#d1a8ad" 291 - let g:terminal_color_6 = "#adc1cb" 292 - let g:terminal_color_7 = "#c6c8d1" 293 - let g:terminal_color_8 = "#444b71" 294 - let g:terminal_color_9 = "#e2a478" 295 - let g:terminal_color_10 = "#b4be82" 296 - let g:terminal_color_11 = "#d8e599" 297 - let g:terminal_color_12 = "#3e445e" 298 - let g:terminal_color_13 = "#673e43" 299 - let g:terminal_color_14 = "#686f9a" 300 - let g:terminal_color_15 = "#d4d5db" 222 + augroup align_windows 223 + au! 224 + autocmd VimResized * wincmd = 225 + augroup END 301 226 " }}} 302 - " }}} 303 - let g:deoplete#enable_at_startup = 1
+12
nvim/plugin/git.vim
··· 1 + nnoremap U <nop> 2 + nnoremap Us :<C-u>Gstatus<CR> 3 + nnoremap Up :<C-u>Git push<CR> 4 + nnoremap Ud :<C-u>Gdiff<CR> 5 + nnoremap UB :<C-u>Gblame<CR> 6 + nnoremap Uc :<C-u>Gcommit<CR> 7 + nnoremap Um :<C-u>Gmerge<CR> 8 + nnoremap Uu :<C-u>Git pull --all<CR> 9 + nnoremap Uf :<C-u>GitFiles<CR> 10 + nnoremap Ul :<C-u>GV<CR> 11 + nnoremap UL :<C-u>GV!<CR> 12 + nmap UU Uu
+12
nvim/plugin/grep.vim
··· 1 + set grepformat^=%f:%l:%c:%m 2 + 3 + if executable('rg') 4 + set grepprg=rg\ --vimgrep 5 + elseif executable('ag') 6 + set grepprg=ag\ --vimgrep 7 + elseif executable('pt') 8 + set grepprg=pt\ --nogroup\ --nocolor 9 + elseif executable('ack') 10 + set grepprg=ack\ --nogroup\ --column\ --smart-case\ --nocolor\ --follow\ $* 11 + endif 12 +
+37 -28
nvim/plugin/projections.vim
··· 1 + func! s:PhoenixFileTemplate(type, ...) 2 + let l:project = '{project|basename|camelcase}' 3 + 4 + return 'defmodule '.l:project.'.{camelcase}'.a:0." do\n" 5 + \.' use '.l:project.'Web, :'.a:type."\n" 6 + \.'end' 7 + endfunc 8 + 1 9 let g:projectionist_heuristics = { 2 - \ "mix.exs&web/web.ex": { 3 - \ "*": { 4 - \ "start": "mix phoenix.server", 5 - \ "make": "mix", 10 + \ 'mix.exs&web/web.ex': { 11 + \ '*': { 12 + \ 'start': 'mix phoenix.server', 13 + \ 'make': 'mix', 14 + \ 'console': 'iex -S mix', 6 15 \ }, 7 16 \ 8 - \ "test/*_test.exs": { 9 - \ "alternate": "web/{}.ex", 10 - \ "dispatch": "mix test {file}", 17 + \ 'test/*_test.exs': { 18 + \ 'alternate': 'web/{}.ex', 19 + \ 'dispatch': 'mix test {file}', 11 20 \ }, 12 21 \ 13 - \ "web/channels/*_channel.ex": { 14 - \ "type": "channel", 15 - \ "alternate": "test/channels/{}_channel_test.exs", 16 - \ "template": "defmodule {project|basename|camelcase}.{camelcase}Channel do\n use {project|basename|camelcase}.Web, :channel\nend" 22 + \ 'web/channels/*_channel.ex': { 23 + \ 'type': 'channel', 24 + \ 'alternate': 'test/channels/{}_channel_test.exs', 25 + \ 'template': <SID>PhoenixFileTemplate('channel', 'Channel'), 17 26 \ }, 18 - \ "web/controllers/*_controller.ex": { 19 - \ "type": "controller", 20 - \ "alternate": "test/controllers/{}_controller_test.exs", 21 - \ "template": "defmodule {project|basename|camelcase}.{camelcase}Controller do\n use {project|basename|camelcase}.Web, :controller\nend" 27 + \ 'web/controllers/*_controller.ex': { 28 + \ 'type': 'controller', 29 + \ 'alternate': 'test/controllers/{}_controller_test.exs', 30 + \ 'template': <SID>PhoenixFileTemplate('controller', 'Controller'), 22 31 \ }, 23 - \ "web/models/*.ex": { 24 - \ "type": "model", 25 - \ "alternate": "test/models/{}_test.exs", 26 - \ "template": "defmodule {project|basename|camelcase}.{camelcase} do\n use {project|basename|camelcase}.Web, :model\nend" 32 + \ 'web/models/*.ex': { 33 + \ 'type': 'model', 34 + \ 'alternate': 'test/models/{}_test.exs', 35 + \ 'template': <SID>PhoenixFileTemplate('model'), 27 36 \ }, 28 - \ "web/uploaders/*.ex": { 29 - \ "type": "uploader", 37 + \ 'web/uploaders/*.ex': { 38 + \ 'type': 'uploader', 30 39 \ }, 31 - \ "web/views/*_view.ex": { 32 - \ "type": "view", 33 - \ "alternate": "test/views/{}_view_test.exs", 34 - \ "template": "defmodule {project|basename|camelcase}.{camelcase}View do\n use {project|basename|camelcase}.Web, :view\nend" 40 + \ 'web/views/*_view.ex': { 41 + \ 'type': 'view', 42 + \ 'alternate': 'test/views/{}_view_test.exs', 43 + \ 'template': <SID>PhoenixFileTemplate('view', 'View'), 35 44 \ }, 36 45 \ 37 - \ "web/router.ex": { "type": "router" }, 46 + \ 'web/router.ex': { 'type': 'router' }, 38 47 \ }, 39 - \ "Cargo.toml": { 40 - \ "src/{}.rs": { "type": "source" } 48 + \ 'Cargo.toml': { 49 + \ 'src/{}.rs': { 'type': 'source' } 41 50 \ } 42 51 \}
+3 -1
nvim/plugin/statusline.vim
··· 1 - let &statusline="%<%2n » %f «%{&modified ? ' +' : ''}%=%4c:%l" 1 + scriptencoding utf-8 2 + 3 + let &statusline="%<%2n » %f «%{&modified ? ' +' : ''}%=%4c:%l %{ALEGetStatusLine()} "
+29
nvim/plugin/terminal.vim
··· 1 + nnoremap <C-q> <nop> 2 + nnoremap <C-q>c :<C-u>term<CR> 3 + nnoremap <C-q>s :<C-u>split +term<CR> 4 + nnoremap <C-q>v :<C-u>vsplit +term<CR> 5 + nnoremap <C-q>t :<C-u>tab term<CR> 6 + 7 + tnoremap <C-q> <C-\><C-n> 8 + tnoremap <C-w>h <C-\><C-n><C-w>h 9 + tnoremap <C-w>j <C-\><C-n><C-w>j 10 + tnoremap <C-w>k <C-\><C-n><C-w>k 11 + tnoremap <C-w>l <C-\><C-n><C-w>l 12 + 13 + au BufEnter term://* startinsert 14 + let g:terminal_color_0 = "#2a3158" 15 + let g:terminal_color_1 = "#e27878" 16 + let g:terminal_color_2 = "#89b8c2" 17 + let g:terminal_color_3 = "#e4aa80" 18 + let g:terminal_color_4 = "#84a0c6" 19 + let g:terminal_color_5 = "#d1a8ad" 20 + let g:terminal_color_6 = "#adc1cb" 21 + let g:terminal_color_7 = "#c6c8d1" 22 + let g:terminal_color_8 = "#444b71" 23 + let g:terminal_color_9 = "#e2a478" 24 + let g:terminal_color_10 = "#b4be82" 25 + let g:terminal_color_11 = "#d8e599" 26 + let g:terminal_color_12 = "#3e445e" 27 + let g:terminal_color_13 = "#673e43" 28 + let g:terminal_color_14 = "#686f9a" 29 + let g:terminal_color_15 = "#d4d5db"
+13 -5
nvim/plugin/vsearch.vim
··· 1 1 " vsearch.vim - simplify visual search 2 2 " Maintainer: Łukasz Niemier <http://lukasz.niemier.pl> 3 3 4 - if exists("g:loaded_whirl") || v:version < 700 || &cp 4 + scriptencoding utf-8 5 + 6 + if exists('g:loaded_vsearch') || v:version < 700 || &cp 5 7 finish 6 8 endif 7 - let g:loaded_whirl = 1 9 + let g:loaded_vsearch = 1 8 10 let s:save_cpo = &cpo 9 11 set cpo&vim 10 12 11 13 function! s:VSetSearch(type, ...) 12 14 let temp = @@ 13 15 if a:0 14 - silent exe "norm! gvy" 15 - elseif a:type == 'line' 16 + silent exe 'norm! gvy' 17 + elseif a:type ==# 'line' 16 18 silent exe "normal! '[V']y" 17 19 else 18 - silent exe "normal! `[v`]y" 20 + silent exe 'normal! `[v`]y' 19 21 endif 20 22 21 23 let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g') ··· 29 31 xnoremap <Plug>(vsearch-change-selected-forward) :<C-u>call <SID>VSetSearch(visualmode(), 1)<CR>:set hlsearch<CR>cgn 30 32 xnoremap <Plug>(vsearch-change-selected-backward) :<C-u>call <SID>VSetSearch(visualmode(), 1)<CR>:set hlsearch<CR>cgN 31 33 34 + nnoremap <Plug>(vsearch-change-word-forward) *Ncgn 35 + nnoremap <Plug>(vsearch-change-word-backward) #Ncgn 36 + 32 37 xmap * <Plug>(vsearch-search-selected-forward) 33 38 xmap # <Plug>(vsearch-search-selected-backward) 34 39 35 40 xmap s <Plug>(vsearch-change-selected-forward) 36 41 xmap S <Plug>(vsearch-change-selected-backward) 42 + 43 + nnoremap s <Plug>(vsearch-change-word-forward) 44 + nnoremap S <Plug>(vsearch-change-word-backward) 37 45 38 46 let &cpo = s:save_cpo
+3 -1
nvim/plugin/whirl.vim
··· 1 1 " whirl.vim - vinegar for your dirvish Maintainer: Łukasz Jan Niemier 2 2 " <http://lukasz.niemier.pl> 3 3 4 - if exists("g:loaded_whirl") || v:version < 700 || &cp 4 + scriptencoding utf-8 5 + 6 + if exists('g:loaded_whirl') || v:version < 700 || &cp 5 7 finish 6 8 endif 7 9 let g:loaded_whirl = 1
+3 -3
nvim/syntax/sql.vim
··· 8 8 " Highlights functions. Unknown functions are an error. 9 9 " Based on the SQL syntax files that come with Vim. 10 10 11 - if exists("b:current_syntax") 11 + if exists('b:current_syntax') 12 12 finish 13 13 endif 14 14 ··· 212 212 213 213 let sh_minlines = 200 214 214 let sh_maxlines = 2 * sh_minlines 215 - exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines 215 + exec 'syn sync minlines=' . sh_minlines . ' maxlines=' . sh_maxlines 216 216 217 217 command -nargs=+ HiLink hi def link <args> 218 218 ··· 241 241 242 242 delcommand HiLink 243 243 244 - let b:current_syntax = "sql" 244 + let b:current_syntax = 'sql'