diff --git a/vimrc b/vimrc index d55e58a..e5be118 100644 --- a/vimrc +++ b/vimrc @@ -10,7 +10,8 @@ set ruler set showcmd set smartcase set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc -" scroll before reaching the first / final line set scrolloff=3 +" scroll before reaching the first / final line +set scrolloff=3 set sidescrolloff=15 set sidescroll=1 " disable bell @@ -27,19 +28,9 @@ set termencoding=utf-8 set encoding=utf-8 set fillchars+=vert:│ -" insert shebang in the beginning of the file based on its name extension -autocmd BufNewFile *.zsh 0put =\"#!/usr/bin/env zsh\\"|$ -autocmd BufNewFile *.lua 0put =\"#!/usr/bin/env lua\\"|$ -autocmd BufNewFile *.sh 0put =\"#!/usr/bin/env bash\\"|$ -autocmd BufNewFile *.rb 0put =\"#!/usr/bin/env ruby\\"|$ -autocmd BufNewFile *.py 0put =\"#!/usr/bin/env python3\\"|$ -autocmd BufNewFile *.pl 0put =\"#!/usr/bin/env perl\\use strict;\\use warnings;\\use feature 'say';\\"|$ - " maps -let mapleader = "," +map noremap -"fold/unfold via spacebar -nnoremap za "enable cursorline on demand nnoremap c :set cursorline! "clear search highlight @@ -50,6 +41,15 @@ noremap k (v:count == 0 ? 'gk' : 'k') "home / end nnoremap H ^ nnoremap L $ +"copy to / paste from clipboard +vmap y "+y +vmap d "+d +nmap p "+p +nmap P "+P +vmap p "+p +vmap P "+P +"quit without saving +nmap qq :qa! " still have to deal with old vim versions :< if v:version >= 700 @@ -135,7 +135,7 @@ if v:version >= 700 nmap a (EasyAlign) " neomake - nmap p :Neomake + nmap i :Neomake let g:neomake_error_sign={ \ 'text': 'e>', \ 'texthl': 'ErrorMsg',