diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .mrconfig | 22 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | bash/.bashrc | 2 | ||||
-rwxr-xr-x | bin/.local/bin/keyboard | 3 | ||||
-rwxr-xr-x | bin/.local/bin/keyboard-us | 8 | ||||
-rwxr-xr-x | bin/.local/bin/workspace | 5 | ||||
-rwxr-xr-x | git/.git_template/hooks/ctags | 5 | ||||
-rw-r--r-- | git/.gitconfig | 2 | ||||
-rw-r--r-- | mutt/.mutt/muttrc | 12 | ||||
-rw-r--r-- | qutebrowser/.config/qutebrowser/config.py | 37 | ||||
-rw-r--r-- | surfraw/.surfraw.bookmarks | 2 | ||||
-rw-r--r-- | surfraw/.surfraw.conf | 3 | ||||
-rw-r--r-- | vifm/.config/vifm/vifmrc | 4 | ||||
l--------- | vim/.config/nvim/view | 1 | ||||
-rw-r--r-- | vim/.vim/spell/en.utf-8.add | 8 | ||||
-rw-r--r-- | vim/.vim/spell/en.utf-8.add.spl | bin | 995 -> 1138 bytes | |||
-rw-r--r-- | vim/.vimrc | 291 | ||||
-rw-r--r-- | zsh/.zshrc | 3 |
19 files changed, 156 insertions, 258 deletions
@@ -1 +1,2 @@ plugins/* +tags @@ -11,4 +11,24 @@ push = git push origin master [$HOME/dotfiles/plugins/vim-tmux-pilot] checkout = git clone 'git@github.com:urbainvaes/vim-tmux-pilot.git' update = git pull origin master -push = git saveandsync +push = git push origin master + +[$HOME/dotfiles/plugins/vim-ripple] +checkout = git clone 'git@github.com:urbainvaes/vim-ripple.git' +update = git pull origin master +push = git push origin master + +[$HOME/dotfiles/plugins/vim-darjeeling] +checkout = git clone 'git@github.com:urbainvaes/vim-darjeeling.git' +update = git pull origin master +push = git push origin master + +[$HOME/dotfiles/plugins/vim-macaw] +checkout = git clone 'git@github.com:urbainvaes/vim-macaw.git' +update = git pull origin master +push = git push origin master + +[$HOME/dotfiles/plugins/nvim-i3scratchpad] +checkout = git clone 'git@github.com:urbainvaes/nvim-i3scratchpad.git' +update = git pull origin master +push = git push origin master @@ -1,11 +1,12 @@ # dotfiles This repository contains my configuration files. Whenever possible, I use tools that follow the Unix philosophy. -Being a *vim* user, I find it very convenient to use tools with *vi* keybindings: +I like *vim* for text editing, +and I find it very convenient to use tools with *vi* keybindings: + Window manager: **i3** + File manager: **vifm** -+ Browser: **uzbl** ++ Browser: **qutebrowser** + PDF viewer: **zathura** + Email client: **mutt** diff --git a/bash/.bashrc b/bash/.bashrc index 542ce53..b5460fc 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -11,5 +11,5 @@ fi # FZF [ -f ~/.fzf.bash ] && source ~/.fzf.bash -FZF_MARKS_PLUGIN=$HOME/Dropbox/projects/fzf-marks/fzf-marks.plugin.bash +FZF_MARKS_PLUGIN=$HOME/dotfiles/plugins/fzf-marks/fzf-marks.plugin.bash [ -f "$FZF_MARKS_PLUGIN" ] && source "$FZF_MARKS_PLUGIN" diff --git a/bin/.local/bin/keyboard b/bin/.local/bin/keyboard index ee1cc61..59a9ee0 100755 --- a/bin/.local/bin/keyboard +++ b/bin/.local/bin/keyboard @@ -51,8 +51,9 @@ xcape -e 'Super_L=space' # xmodmap -e "keycode any = Return" # xcape -e 'Control_R=Return' -# Make eject an Insert +# Make eject and Home an Insert xmodmap -e "keysym XF86Eject = Insert" +xmodmap -e "keysym Home = Insert" # Numbers xmodmap -e "keysym d = d D 0" diff --git a/bin/.local/bin/keyboard-us b/bin/.local/bin/keyboard-us index 1b6ceba..1b150fc 100755 --- a/bin/.local/bin/keyboard-us +++ b/bin/.local/bin/keyboard-us @@ -13,10 +13,10 @@ setxkbmap us xmodmap -e "clear Lock" xmodmap -e "keysym Caps_Lock = Control_L Control_L" xmodmap -e "add Control = Control_L" -xcape -e 'Control_L=Escape' +# xcape -e 'Control_L=Escape' # Make space (Super_L, space) -xmodmap -e "keysym space = Super_L" -xmodmap -e "add mod4 = Super_L" -xmodmap -e "keycode any = space" +# xmodmap -e "keysym space = Super_L" +# xmodmap -e "add mod4 = Super_L" +# xmodmap -e "keycode any = space" # xcape -e 'Super_L=space' diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace index 4f2ab67..36f09d4 100755 --- a/bin/.local/bin/workspace +++ b/bin/.local/bin/workspace @@ -1,14 +1,13 @@ #!/usr/bin/env bash -# List of workspaces: (id, number, name) +# List of workspaces: ( number, name, focused) workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN { RS="(},{)|(\\[{)|(}\\])"; FPAT="([^,:\"]+)|([^,\"]+:[^,\"]+)|([^,]+{[^}]+})" } $0 !~ "^\\s*$" { gsub(/"/, "", $4) - print $4, $6 - + print $4, $6, $10 }' | sort) act_on_container() { diff --git a/git/.git_template/hooks/ctags b/git/.git_template/hooks/ctags index a52759d..fe27a19 100755 --- a/git/.git_template/hooks/ctags +++ b/git/.git_template/hooks/ctags @@ -1,7 +1,6 @@ #!/bin/sh set -e PATH="/usr/local/bin:$PATH" -dir="$(git rev-parse --git-dir)" trap 'rm -f "$dir/$$.tags"' EXIT -git ls-files | ctags --tag-relative=yes -L - -f"$dir/$$.tags" --languages=-javascript,sql -mv "$dir/$$.tags" "$dir/tags" +git ls-files | ctags --tag-relative=yes -L - -f"$$.tags" --languages=-javascript,sql +mv "$$.tags" "tags" diff --git a/git/.gitconfig b/git/.gitconfig index 1169c34..79e64f8 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -19,3 +19,5 @@ default = simple [merge] ff = true +[pull] + rebase = false diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc index 95faa6f..7ad8cbf 100644 --- a/mutt/.mutt/muttrc +++ b/mutt/.mutt/muttrc @@ -1,11 +1,11 @@ # Folders -set folder = ~/.mail -set alias_file = ~/.mutt/alias -set header_cache = ~/.mutt/cache/headers +set folder = ~/.mail +set alias_file = ~/.mutt/alias +set header_cache = ~/.mutt/cache/headers set message_cachedir = ~/.mutt/cache/bodies set certificate_file = ~/.mutt/certificates -set mailcap_path = ~/.mutt/mailcap -set tmpdir = ~/.mutt/temp +set mailcap_path = ~/.mutt/mailcap +set tmpdir = ~/.mutt/temp # Source crypto, aliases, mailboxes source ~/.mutt/colors/base.muttrc @@ -64,6 +64,8 @@ alternative_order text/plain text/enriched text/html set editor="$EDITOR" set include=yes +# Index +set index_format="%X %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" # Macros macro index,pager gp "<change-folder> +Personal/Personal<enter>" diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index f4acf32..e766985 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -1,7 +1,29 @@ +# pylint: disable=C0111 # Documentation: # qute://help/configuring.html # qute://help/settings.html +from qutebrowser.api import interceptor + +c = c +config = config + + +def filter_yt(info: interceptor.Request): + url = info.request_url + if (url.host() == 'www.youtube.com' + and url.path() == '/get_video_info' + and '&adformat=' in url.query()): + info.block() + + +interceptor.register(filter_yt) + + +# Colors +c.colors.tabs.selected.odd.bg = "#875f5f" +c.colors.tabs.selected.even.bg = "#875f5f" + c.content.images = True c.downloads.location.prompt = False c.editor.command = ['urxvt', '-e', 'nvim', '-f', '{}'] @@ -9,7 +31,7 @@ c.fonts.hints = 'bold 12pt monospace' c.hints.chars = 'aoeuidhtns' c.hints.uppercase = True c.tabs.show = 'multiple' -c.tabs.tabs_are_windows = True +c.tabs.tabs_are_windows = False c.url.start_pages = ['file:///home/urbain/personal/index.html'] c.url.default_page = c.url.start_pages[0] c.completion.open_categories = ['bookmarks', 'history'] @@ -30,6 +52,14 @@ config.bind(",o", 'set-cmd-text -s :spawn --userscript url-from-surfraw') config.bind(",O", 'set-cmd-text -s :spawn --userscript url-from-surfraw -t') config.bind("f", 'hint all current') +config.bind("gh", 'tab-move -') +config.bind("gl", 'tab-move +') +# config.bind("gt", 'tab-next') +# config.bind("gT", 'tab-prev') +config.bind("<Ctrl-L>", 'tab-next') +config.bind("<Ctrl-H>", 'tab-prev') +config.bind("<Ctrl-D>", 'tab-close') + # Bindings for insert mode # config.unbind("<Ctrl-A>", mode='insert') config.bind("<Ctrl-A>", 'fake-key <Home>', mode='insert') @@ -50,7 +80,7 @@ config.bind('<Ctrl-N>', 'completion-item-focus next', mode='command') # Search engines c.url.searchengines = { - 'DEFAULT': 'https://startpage.com/do/search?query={}', + 'DEFAULT': 'https://www.ecosia.org/search?q={}', 'amazon': 'https://www.amazon.co.uk/s?k={}', 'aw': 'https://wiki.archlinux.org/index.php?search={}', 'ddg': 'https://duckduckgo.com/?q={}', @@ -74,4 +104,5 @@ c.aliases = { } # Style sheet -c.content.user_stylesheets='/home/urbain/dotfiles/qutebrowser/.config/qutebrowser/style.css' +c.content.user_stylesheets = '/home/urbain/dotfiles/qutebrowser/.config/qutebrowser/style.css' + diff --git a/surfraw/.surfraw.bookmarks b/surfraw/.surfraw.bookmarks deleted file mode 100644 index a46527b..0000000 --- a/surfraw/.surfraw.bookmarks +++ /dev/null @@ -1,2 +0,0 @@ -startpage https://startpage.com/do/search?hmb=1&cat=web&cmd=process_search&language=english_uk&engine0=v1all&query=%s&abp=-1&nj=0&pg=0 -dictionary http://www.dictionary.com/browse/%s diff --git a/surfraw/.surfraw.conf b/surfraw/.surfraw.conf deleted file mode 100644 index 07cedef..0000000 --- a/surfraw/.surfraw.conf +++ /dev/null @@ -1,3 +0,0 @@ -SURFRAW_graphical_browser=/usr/bin/xdg-open -SURFRAW_text_browser=w3m -SURFRAW_graphical=yes diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index 7a73409..0dd5220 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -1,11 +1,12 @@ " Command to open files filetype *.JPG feh %f & -filetype *.exe wine %f & +filetype *.exe wine %f & filetype * xdg-open %f & " Options set fastrun set history=100 +set ignorecase set incsearch set sortnumbers set scrolloff=2 @@ -31,6 +32,7 @@ nnoremap gm :bmark<space> nnoremap gb :bmarks<cr> nnoremap g<cr> :!nvim %f<cr> nnoremap r :run<cr> +nnoremap T :tree!<cr> nnoremap ,b :backup<cr> nnoremap ,t :!urxvt &<cr> nnoremap ,l :!less %f<cr> diff --git a/vim/.config/nvim/view b/vim/.config/nvim/view deleted file mode 120000 index fcd4091..0000000 --- a/vim/.config/nvim/view +++ /dev/null @@ -1 +0,0 @@ -../../../../.vim/view
\ No newline at end of file diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index ddbe70a..dbb52c2 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -62,3 +62,11 @@ multimodal Kalman i.e. Stratonovich +colorscheme +colorscheme +plugin +hypoellipticity +minorization +perturbative +documentclass +preconditioner diff --git a/vim/.vim/spell/en.utf-8.add.spl b/vim/.vim/spell/en.utf-8.add.spl Binary files differindex e9828ae..c1471ca 100644 --- a/vim/.vim/spell/en.utf-8.add.spl +++ b/vim/.vim/spell/en.utf-8.add.spl @@ -11,17 +11,12 @@ let maplocalleader = "," "" Plugins {{{1 call plug#begin('~/.vim/plugged') -Plug 'LnL7/vim-nix' Plug 'PotatoesMaster/i3-vim-syntax' Plug 'SirVer/ultisnips' Plug 'airblade/vim-gitgutter' Plug 'AndrewRadev/splitjoin.vim' -Plug 'beloglazov/vim-online-thesaurus' Plug 'easymotion/vim-easymotion' -Plug 'holomorph/vim-freefem' Plug 'honza/vim-snippets' -Plug 'inkarkat/vim-SpellCheck' -Plug 'inkarkat/vim-ingo-library' Plug 'jamessan/vim-gnupg' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' @@ -34,16 +29,14 @@ Plug 'junegunn/vim-slash' Plug 'justinmk/vim-dirvish' Plug 'justinmk/vim-sneak' Plug 'kshenoy/vim-signature' -Plug 'lervag/vimtex' +Plug 'lervag/vimtex', {'commit': '8287981'} Plug 'machakann/vim-highlightedyank' Plug 'majutsushi/tagbar' +Plug 'mg979/vim-visual-multi' Plug 'neomake/neomake' -Plug 'scrooloose/nerdtree' Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } -Plug 'terryma/vim-multiple-cursors' Plug 'tommcdo/vim-exchange' Plug 'tommcdo/vim-ninja-feet' -Plug 'ton/vim-bufsurf' Plug 'tpope/vim-abolish' Plug 'tpope/vim-apathy' Plug 'tpope/vim-commentary' @@ -64,40 +57,27 @@ let g:zoomwintab_hidetabbar=0 Plug 'vim-scripts/ReplaceWithRegister' Plug 'vim-scripts/gmsh.vim' Plug 'wellle/targets.vim' -" Plug 'zchee/deoplete-clang' - -Plug 'liuchengxu/vim-which-key' if isdirectory($HOME."/dotfiles/plugins") Plug '~/dotfiles/plugins/vim-remembrall' Plug '~/dotfiles/plugins/vim-tmux-pilot' - Plug '~/dotfiles/plugins/darjeeling' + Plug '~/dotfiles/plugins/vim-ripple' + Plug '~/dotfiles/plugins/vim-darjeeling' + Plug '~/dotfiles/plugins/vim-macaw' endif if has("nvim") - " Plug 'roxma/nvim-completion-manager' - " Plug 'Shougo/deoplete.nvim', { 'do' : ':UpdateRemotePlugins', 'tag' : '4.1' } - " Plug 'autozimu/LanguageClient-neovim', { 'do': 'bash install.sh', 'branch': 'next' } - " Plug 'zchee/deoplete-jedi' - " Plug 'hkupty/iron.nvim', { 'branch': 'legacy' } - Plug 'hkupty/iron.nvim' + Plug '~/dotfiles/plugins/nvim-i3scratchpad' Plug 'neovim/nvim-lsp' -else - Plug 'Shougo/neocomplete.vim' endif " Colors -Plug 'KKPMW/sacredforest-vim' Plug 'altercation/vim-colors-solarized' -Plug 'arcticicestudio/nord-vim' -Plug 'KKPMW/moonshine-vim' Plug 'KKPMW/sacredforest-vim' Plug 'junegunn/seoul256.vim' Plug 'romainl/Apprentice' -Plug 'joshdick/onedark.vim' -" Plug 'josuegaleas/jay' - -" Plug 'neoclide/coc.nvim', {'branch': 'release'} +Plug 'arcticicestudio/nord-vim' +" Plug 'axvr/zepl.vim' call plug#end() "" Plugin configuration {{{1 @@ -109,24 +89,20 @@ nnoremap cpt :TagbarToggle<cr> nnoremap cpu :GundoToggle<cr> nnoremap <expr> cp Remembrall('cp') -" Easy motion -map gs <Plug>(easymotion-prefix) - " Fuzzy finder -nnoremap <c-p>a :Ag -nnoremap <c-p>b :Buffers<cr> -nnoremap <c-p>C :Colors<cr> -nnoremap <c-p>f :Files<cr> -nnoremap <c-p>g :GitFiles<cr> -nnoremap <c-p>r :History<cr> -nnoremap <c-p>: :History:<cr> -nnoremap <c-p>/ :History/<cr> -nnoremap <c-p>l :BLines<cr> -nnoremap <c-p>a :Ag - -nnoremap <a-b> :Buffers<cr> -nnoremap <a-f> :Files<cr> -nnoremap <a-g> :GitFiles<cr> +nnoremap <c-p>a :Ag +nnoremap <c-p>b :Buffers<cr> +nnoremap <c-p>C :Colors<cr> +nnoremap <c-p>f :Files<cr> +nnoremap <c-p>g :GitFiles<cr> +nnoremap <c-p>r :History<cr> +nnoremap <c-p>: :History:<cr> +nnoremap <c-p>/ :History/<cr> +nnoremap <c-p>l :BLines<cr> + +nnoremap <a-b> :Buffers<cr> +nnoremap <a-f> :Files<cr> +nnoremap <a-g> :GitFiles<cr> " Fugitive nnoremap <Leader>gs :Gstatus<cr> @@ -134,6 +110,11 @@ nnoremap <Leader>gc :Gcommit<cr> nnoremap <Leader>gr :Gread<cr> nnoremap <Leader>gd :Gdiff<cr> +" Multiple cursors +let g:VM_maps = {} +let g:VM_maps["Select Cursor Down"] = "<M-j>" +let g:VM_maps["Select Cursor Up"] = "<M-k>" + " Heytmux function! Call_heytmux(vm) call feedkeys(":'[,']Heytmux!
") @@ -142,42 +123,12 @@ endfunction nnoremap <silent> gh :set opfunc=Call_heytmux<cr>g@ xnoremap <silent> gh :Heytmux!<cr> -" Iron -if has("nvim") - let g:iron_map_defaults=0 - let g:iron_map_extended=0 - nnoremap cpr :IronRepl<cr> - nmap yr <Plug>(iron-send-motion) - xmap R <Plug>(iron-send-motion) - nmap yp <Plug>(iron-repeat-cmd) - nmap yrr VR - -lua << EOF -local iron = require("iron") - -local open_repl = function(buffer) - vim.api.nvim_command('vnew') -end - -iron.core.set_config{ - preferred = { - python = "ipython" - }, - repl_open_cmd = open_repl -} -EOF -" let g:iron_repl_open_cmd = 'vsplit' -endif - " Easy align xmap ga <Plug>(EasyAlign) nmap ga <Plug>(EasyAlign) xmap gl <Plug>(LiveEasyAlign) nmap gl <Plug>(LiveEasyAlign) -" Online thesaurus -nnoremap cpd :OnlineThesaurusCurrentWord<cr> - " Plug nnoremap ,pi :PlugInstall<cr> nnoremap ,pu :PlugUpdate<cr> @@ -193,16 +144,8 @@ if &runtimepath =~ 'remembrall' augroup END endif let g:remembrall_suffixes = [""] - -" LanguageClient -if executable('pyls') - let g:LanguageClient_serverCommands = { 'python': ['pyls'], } -endif - -let g:LanguageClient_diagnosticsEnable = 0 -nnoremap <silent> <leader>lh :call LanguageClient#textDocument_hover()<CR> -nnoremap <silent> <leader>ld :call LanguageClient#textDocument_definition()<CR> -nnoremap <silent> <leader>lr :call LanguageClient#textDocument_rename()<CR> +let g:ripple_winpos = "vertical" +let g:ripple_term_name = "term: ripple" " Ultisnips nnoremap cps :UltiSnipsEdit<cr> @@ -223,30 +166,14 @@ let g:neomake_gcc_args=[ let g:neomake_python_enabled_makers = ['python', 'pylint'] -" Deoplete -let g:deoplete#enable_at_startup = 1 -let g:deoplete#sources#jedi#show_docstring = 1 -if !exists('g:deoplete#omni#input_patterns') - let g:deoplete#omni#input_patterns = {} -endif - -if &runtimepath =~ 'vimtex' - let g:deoplete#omni#input_patterns.tex = g:vimtex#re#deoplete -endif - " FZF.vim +let $FZF_DEFAULT_OPTS='--layout=reverse' let g:fzf_buffers_jump = 1 +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } " Gundo let g:gundo_prefer_python3 = 1 -" Localvimrc -let g:localvimrc_sandbox = 0 -let g:localvimrc_whitelist='/home/*' - -" NerdTree -let g:NERDTreeHijackNetrw = 0 - " Ultisnips let g:UltiSnipsEditSplit="horizontal" let g:UltiSnipsExpandTrigger="<tab>" @@ -263,13 +190,13 @@ let g:vimtex_view_method='zathura' let g:vimtex_quickfix_mode=2 let g:vimtex_compiler_progname='nvr' let g:vimtex_syntax_enabled=1 -" let g:vimtex_fold_types = { -" \ 'preamble' : {'enabled' : 0}, -" \ 'envs' : { -" \ 'blacklist' : ['lemma', 'proposition', 'theorem', 'equation'], -" \ 'whitelist' : ['proof'], -" \ }, -" \} +let g:vimtex_toc_config={ + \ 'layer_status': { + \ 'content': 1, + \ 'label': 0, + \ 'todo': 1, + \ 'include': 1 }, + \ 'show_help': 0} " Pilot let g:pilot_boundary='ignore' @@ -281,32 +208,6 @@ let g:pilot_mode='wintab' " let g:pilot_key_l='<a-l>' " let g:pilot_key_p='<a-\>' -" YouCompleteMe -let g:ycm_key_list_select_completion = ['<C-n>', '<Down>'] -let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>'] -let g:ycm_add_preview_to_completeopt = 0 -let g:ycm_confirm_extra_conf = 0 -let g:ycm_auto_trigger = 1 -if !exists('g:ycm_semantic_triggers') - let g:ycm_semantic_triggers = {} - let g:ycm_semantic_triggers.tex = ['re!\\[A-Za-z]*(ref|cite)[A-Za-z]*([^]]*])?{([^}]*, ?)*' ] -endif - -" Plugins interactions -function! Multiple_cursors_before() - if has("nvim") && &runtimepath =~ 'deoplete' - let b:deoplete_disable_auto_complete = 1 - call deoplete#disable() - endif -endfunction - -function! Multiple_cursors_after() - if has("nvim") && &runtimepath =~ 'deoplete' - let b:deoplete_disable_auto_complete = 0 - call deoplete#enable() - endif -endfunction - "" Vim variables {{{1 let g:netrw_bufsettings='relativenumber' let g:tex_conceal= '' @@ -321,7 +222,7 @@ set undodir^=~/.vim/undo// " ^= : prepends to list " // : store absolute path -set complete+=k +" set complete+=k set conceallevel=2 set cursorline set diffopt=filler,vertical,hiddenoff @@ -332,7 +233,10 @@ set hidden set ignorecase set lazyredraw set laststatus=2 +set listchars+=eol:$ +set wildcharm=<C-z> set mouse=a +" set noequalalways set nojoinspaces set nowrap set path+=$PWD/** @@ -340,7 +244,7 @@ set shiftwidth=4 set showcmd set splitright set smartcase -set smartindent +set nosmartindent set softtabstop=-1 " set sotftabstop=&shiftwidth " set formatoptions+=orw silent! set breakindent @@ -360,6 +264,8 @@ endif nnoremap <leader>1 m`yypVr=`` nnoremap <leader>2 m`yypVr-`` +nnoremap <leader>m :.m + nnoremap n nzz nnoremap N Nzz @@ -406,12 +312,6 @@ cnoremap <c-n> <down> cnoremap <up> <c-p> cnoremap <down> <c-n> -" Overwrite unimpaired mappings -nnoremap <silent> <b :BufSurfBack<cr> -nnoremap <silent> >b :BufSurfForward<cr> -nnoremap <silent> <B :BufSurfBack<cr>:bd! #<cr> -nnoremap <silent> >B :BufSurfForward<cr>:bd! #<cr> - " Alternate file nnoremap <bs> nnoremap + :Buffers<cr> @@ -432,18 +332,11 @@ nnoremap ,e :E " Unimpaired nmap co yo -"" Colorscheme {{{1 -nnoremap ,c :colorscheme<space> -nnoremap ,cl :set background=light<cr>:colorscheme solarized<cr> -nnoremap ,cl :set background=dark<cr>:colorscheme solarized<cr> -nnoremap ,cs :colorscheme seoul256<cr> -nnoremap ,cn :colorscheme nord<cr> -set notermguicolors -colo seoul256 - "" Autocommands {{{1 augroup vimrc autocmd! + " autocmd ColorScheme * highlight String ctermfg=192 guifg=#d7ff87 + " autocmd ColorScheme * highlight Folded ctermbg=23 ctermfg=185 guibg=#005f5f guifg=#d7d75f autocmd BufWritePost *vimrc,*exrc :call feedkeys(":source %\<cr>") autocmd BufNewFile,Bufread /tmp/mutt-* setlocal tw=72 autocmd BufWritePre * @@ -473,6 +366,12 @@ augroup vimrc autocmd FileType dirvish silent! unmap <buffer> <C-p> augroup END +"" Colorscheme {{{1 +nnoremap ,cd :colorscheme darjeeling<cr> +nnoremap ,cs :colorscheme seoul256<cr> +set notermguicolors +colo darjeeling + "" My search {{{1 " http://vim.wikia.com/wiki/Searching_for_files @@ -582,77 +481,15 @@ if has("nvim") endif "" Experimental {{{1 -set wildcharm=<C-z> -nnoremap ,e :e **/*<C-z><S-Tab> - -let $FZF_DEFAULT_OPTS='--layout=reverse' -let g:fzf_layout = { 'window': 'call FloatingFZF()' } - -hi Pmenu ctermfg=3 ctermbg=239 -function! FloatingFZF() - let buf = nvim_create_buf(v:false, v:true) - call setbufvar(buf, '&laststatus', '1') - - let height = &lines - 10 - let width = float2nr(&columns - (&columns * 2 / 10)) - let col = float2nr((&columns - width) / 2) - - let opts = { - \ 'relative': 'editor', - \ 'row': 5, - \ 'col': col, - \ 'width': width, - \ 'height': height - \ } - - call nvim_open_win(buf, v:true, opts) - call setbufvar(buf, '&laststatus', '2') -endfunction - -" highlight default link LspDiagnosticsError Delimiter -" highlight default link LspDiagnosticsWarning Delimiter -" lua << EOF -" require'nvim_lsp'.pyls.setup{} -" EOF - -" Default Values: -" cmd = { "pyls" } -" filetypes = { "python" } -" log_level = 2 -" root_dir = vim's starting directory -" settings = {} - -" if !exists('g:lsp_config_sourced') -" call lsp#add_filetype_config({ -" \ 'filetype': 'python', -" \ 'name': 'pyls', -" \ 'cmd': 'pyls', -" \ 'callbacks': {} -" \ }) -" autocmd Filetype python setl omnifunc=lsp#omnifunc -" let g:lsp_config_sourced = 1 -" endif - -" lua <<EOF -" vim.lsp.start_client({"pyls"}) -" EOF -" nvim_lsp = require('nvim_lsp') -" print(nvim_lsp.skeleton) - -autocmd Filetype python setl omnifunc=v:lua.vim.lsp.omnifunc -nnoremap <expr> <c-g> Remembrall('<c-g>') -nnoremap <silent> <c-g>h <cmd>lua vim.lsp.buf.hover()<cr> -nnoremap <silent> <c-g>a <cmd>lua vim.lsp.buf.declaration()<cr> -nnoremap <silent> <c-g>d <cmd>lua vim.lsp.buf.definition()<cr> -nnoremap <silent> <c-g>i <cmd>lua vim.lsp.buf.implementation()<cr> -nnoremap <silent> <c-g>s <cmd>lua vim.lsp.buf.signature_help()<cr> -nnoremap <silent> <c-g>t <cmd>lua vim.lsp.buf.type_definition()<cr> - -" inoremap <c-g><esc>:call remembrall#remind('i', '<c-g>')<cr> -" nnoremap <expr> <c-g> Remembrall('<c-g>') -" nnoremap <c-g>h <esc>:call lsp#text_document_hover()<cr> -" nnoremap <c-g>a <esc>:call lsp#text_document_declaration()<cr> -" nnoremap <c-g>d <esc>:call lsp#text_document_definition()<cr> -" nnoremap <c-g>i <esc>:call lsp#text_document_implementation()<cr> -" nnoremap <c-g>s <esc>:call lsp#text_document_signature_help()<cr> -" nnoremap <c-g>t <esc>:call lsp#text_document_type_definition()<cr> +if has("nvim") + lua require'nvim_lsp'.pyls.setup{} + autocmd Filetype python setlocal omnifunc=v:lua.vim.lsp.omnifunc + nnoremap <expr> <c-g> Remembrall('<c-g>') + nnoremap <silent> <c-g>h <cmd>lua vim.lsp.buf.hover()<cr> + nnoremap <silent> <c-g>a <cmd>lua vim.lsp.buf.declaration()<cr> + nnoremap <silent> <c-g>d <cmd>lua vim.lsp.buf.definition()<cr> + nnoremap <silent> <c-g>i <cmd>lua vim.lsp.buf.implementation()<cr> + nnoremap <silent> <c-g>s <cmd>lua vim.lsp.buf.signature_help()<cr> + nnoremap <silent> <c-g>t <cmd>lua vim.lsp.buf.type_definition()<cr> + nnoremap <silent> <c-g><c-g> <cmd>lua vim.lsp.stop_client(vim.lsp.get_active_clients())<cr> +endif @@ -43,6 +43,7 @@ setopt inc_append_history setopt no_share_history # Completion +autoload -Uz compinit && compinit zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*' # Kill word @@ -65,8 +66,8 @@ fi source "$HOME/.zsh/zgen/zgen.zsh" FZF_MARKS_PLUGIN_ZSH=$HOME/dotfiles/plugins/fzf-marks/fzf-marks.plugin.zsh -FZF_MARKS_COMMAND='fzf --height 40% --reverse -e' [ -f "$FZF_MARKS_PLUGIN_ZSH" ] && source "$FZF_MARKS_PLUGIN_ZSH" +FZF_MARKS_COMMAND="$FZF_MARKS_COMMAND -e -n 1 -d ' : '" if ! zgen saved; then echo "Creating a zgen save" |