From 972ecadeaae884d89a3ac3443a2a6ace39d53f90 Mon Sep 17 00:00:00 2001 From: Von Random Date: Sat, 7 Feb 2015 00:23:05 +0300 Subject: [PATCH] added some stuff to vimrc, including moved leader (backslash is dumb) and added glorious python-mode --- vimrc | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/vimrc b/vimrc index 8a9b3ce..06beb71 100644 --- a/vimrc +++ b/vimrc @@ -22,6 +22,11 @@ set smartcase set clipboard=exclude:.* set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L] set foldmethod=marker +set cursorline +" scroll before reaching the first / final line +set scrolloff=8 +set sidescrolloff=15 +set sidescroll=1 " disable bell set noerrorbells visualbell t_vb= @@ -30,7 +35,7 @@ if $TERM == 'xterm' || $TERM == 'screen' || exists("$SSH_CLIENT") let &t_Co=256 endif -" set indentation options for specific file types +" 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\\"|$ @@ -39,11 +44,21 @@ autocmd BufNewFile *.py 0put =\"#!/usr/bin/env python\\"|$ autocmd BufNewFile *.pl 0put =\"#!/usr/bin/env perl\\use strict;\\use warnings;\\use feature 'say';\\"|$ " maps +let mapleader = "," nmap +noremap +"make it easier to exit insert mode +inoremap jk +"clear search highlight +nnoremap / :nohls +"make wrapped lines navigation easier nnoremap j gj nnoremap k gk vnoremap j gj vnoremap k gk +"home / end +nnoremap H ^ +nnoremap L $ " still have to deal with old vim versions :< if v:version >= 700 @@ -52,8 +67,8 @@ if v:version >= 700 set list set listchars=tab:\|.,trail:*,nbsp:x - nnoremap l :setlocal list! - nnoremap n :setlocal number! + nnoremap l :setlocal list! + nnoremap n :setlocal number! " enable case indentation let g:sh_indent_case_labels=1 @@ -72,6 +87,7 @@ if v:version >= 700 Plugin 'bhiestand/vcscommand' "shortcuts for vcs Plugin 'jeetsukumaran/vim-buffergator' "buffer management Plugin 'kien/ctrlp.vim' "some quick file accessing goodness + Plugin 'klen/python-mode' "python IDE stuff Plugin 'mhinz/vim-signify' "version control system gutter info Plugin 'msanders/snipmate.vim' "snippets support Plugin 'scrooloose/nerdcommenter' "comment manager @@ -88,14 +104,11 @@ if v:version >= 700 " colorscheme ... Plugin 'vdrandom/forked-solarized.vim' "solarized - Plugin 'cocopon/iceberg.vim' "iceberg Plugin 'morhetz/gruvbox' "gruvbox - Plugin 'nanotech/jellybeans.vim' "jellybeans Plugin 'whatyouhide/vim-gotham' "gotham Plugin 'vim-scripts/strange' "strange " syntax highlight plugins - Plugin 'dag/vim-fish' "fish Plugin 'puppetlabs/puppet-syntax-vim' "puppet Plugin 'nagios-syntax' "nagios / icinga silent! call vundle#end() @@ -114,10 +127,10 @@ if v:version >= 700 " nerdtree options let NERDTreeDirArrows=0 - map . :NERDTreeToggle + map . :NERDTreeToggle " buffergator options - map , :BuffergatorToggle + map , :BuffergatorOpen endif " gvim and colorschemes related stuff