Created
February 19, 2017 16:17
-
-
Save chew-z/68d62400dc21b361846f611e2de4e7d2 to your computer and use it in GitHub Desktop.
My .gvimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Only MacVim-related options here | |
| " | |
| :cd ~/Documents | |
| " | |
| " start in fullscreen mode | |
| " set fu | |
| set columns=80 | |
| set lines=42 | |
| set guifont=Hack:h14 | |
| " set guifont=Space\ Mono:h14 | |
| set antialias | |
| highlight Comment gui=italic | |
| set linespace=2 | |
| if (exists('+colorcolumn')) | |
| set colorcolumn=80 | |
| highlight ColorColumn ctermbg=9 | |
| endif | |
| " show tabs OS style (MacVim) | |
| set guioptions+=e | |
| set showtabline=2 | |
| " remove ugly scrollbars (MacVim) | |
| set guioptions-=r | |
| " In MacVim, you can have multiple tabs open. This mapping makes Ctrl-Tab | |
| " switch between them, like browser tabs. Ctrl-Shift-Tab goes the other way | |
| noremap <C-Tab> :tabnext<CR> | |
| " noremap <C-S-Tab> :tabprev<CR> | |
| " | |
| if has("gui_macvim") | |
| " Disable the print key for MacVim | |
| macmenu &File.Print key=<nop> | |
| " Look up word in Dictionary.app | |
| map <D-d> :Silent open dict://<cword><CR><CR> | |
| " Set fzf launcher script for MacVim | |
| let g:fzf_launcher = "/usr/local/bin/fzf_MacVim %s" | |
| " for MacVim with script we have to escape '!' character twice (no joking) in --glob option | |
| " - otherwise we getting errors caused by bash/zsh expansion of ! | |
| command! -bang -nargs=* Rg | |
| \ call fzf#vim#grep( | |
| \ 'rg --column --color=always --no-heading --smart-case --hidden --follow --glob "\\!.git/*" '.shellescape(<q-args>), 1, | |
| \ <bang>0 ? fzf#vim#with_preview('up:60%') | |
| \ : fzf#vim#with_preview('right:50%:hidden', '?'), | |
| \ <bang>0) | |
| " | |
| command! -bang -nargs=* Notes | |
| \ call fzf#vim#grep( | |
| \ 'rg --vimgrep --color=always --smart-case -g "\\!*.enex" '.shellescape(<q-args>).' ~/Notes ', 1, | |
| \ <bang>0 ? fzf#vim#with_preview('up:60%') | |
| \ : fzf#vim#with_preview('right:50%:hidden', '?'), | |
| \ <bang>0) | |
| endif | |
| " au VimLeave * " (activate iTerm2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment