From 12c06d827c1b7e28e9daba7485a2067fa7b0ae71 Mon Sep 17 00:00:00 2001 From: LER0ever Date: Thu, 13 Apr 2017 21:47:18 -0500 Subject: [PATCH] feat(keymap): map ; to : in visual mode for faster command --- .vimrc | 31 ++++++++++++++++--------------- .vimrc.gui | 4 ++-- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.vimrc b/.vimrc index 088bbd6..1e50332 100644 --- a/.vimrc +++ b/.vimrc @@ -22,15 +22,15 @@ silent function! NVIM() return has('nvim') endfunction - silent function! DISTRO() - return substitute(system('lsb_release -si'), '[\n]\+', '', 'g') - endfunction - silent function! DISTROVERSION() - return substitute(system('lsb_release -sdr'), '[\n]\+', '', 'g') - endfunction - silent function! OSXVERSION() - return substitute(system("echo $(sw_vers -productVersion)"), '[\n]\+', '', 'g') - endfunction + silent function! DISTRO() + return substitute(system('lsb_release -si'), '[\n]\+', '', '') + endfunction + silent function! DISTROVERSION() + return substitute(system('lsb_release -sdr'), '[\n]\+', '', '') + endfunction + silent function! OSXVERSION() + return substitute(system("echo -n $(sw_vers -productVersion)"), '[\n]\+', '', '') + endfunction " } @@ -267,8 +267,6 @@ autocmd BufNewFile,BufRead *.coffee set filetype=coffee - autocmd FileType vim set tabstop=4 shiftwidth=4 expandtab - " Workaround vim-commentary for Haskell autocmd FileType haskell setlocal commentstring=--\ %s " Workaround broken colour highlighting in Haskell @@ -328,6 +326,9 @@ " Remove keybinding for Ex Mode nnoremap Q + " Remap ; to : in visual mode + nnoremap ; : + " End/Start of line motion keys act relative to row/wrap width in the " presence of `:set wrap`, and relative to line for `:set nowrap`. " Default vim behaviour is to act relative to text line in both cases @@ -1390,10 +1391,10 @@ if filereadable(expand('~/.gvimrc')) source ~/.gvimrc - else - if filereadable(expand('~/.vimrc.gui')) - source ~/.vimrc.gui - endif + else + if filereadable(expand('~/.vimrc.gui')) + source ~/.vimrc.gui + endif endif " } diff --git a/.vimrc.gui b/.vimrc.gui index 9866fbf..1c12fe1 100644 --- a/.vimrc.gui +++ b/.vimrc.gui @@ -6,7 +6,7 @@ set lines=40 " 40 lines of text instead of 24 if !exists("g:evervim_no_big_font") if LINUX() && has("gui_running") - set guifont=Knack\ Nerd\ Font\ Regular\ 13,Noto\ Mono\ Regular\ 12,Menlo\ Regular\ 11,Consolas\ Regular\ 12,Courier\ New\ Regular\ 14 + set guifont=Knack\ Nerd\ Font\ Regular\ 11,Noto\ Mono\ Regular\ 12,Menlo\ Regular\ 11,Consolas\ Regular\ 12,Courier\ New\ Regular\ 14 elseif OSX() && has("gui_running") set guifont=Andale\ Mono\ Regular:h12,Menlo\ Regular:h11,Consolas\ Regular:h12,Courier\ New\ Regular:h14 elseif WINDOWS() && has("gui_running") @@ -23,7 +23,7 @@ " NeoVim-Qt (here instead of ginit.vim) if exists('g:GuiLoaded') if !WINDOWS() - Guifont Knack Nerd Font:h11 + Guifont Knack Nerd Font:h10 "call rpcnotify(1, 'Gui', 'Font', 'Knack Nerd Font 20') else Guifont Knack NF:h10