4 maja 2014

vimrc

Moja konfiguracja Vima.
Kolorowanie składni: http://ethanschoonover.com/solarized

(archiwum: vimrc)

" 2017-11-23

if has("unix")
	let $VIMRUNTIME=$HOME.'/.vim/'
endif

" Num keypad mappings
imap <Esc>Oq 1
imap <Esc>Or 2
imap <Esc>Os 3
imap <Esc>Ot 4
imap <Esc>Ou 5
imap <Esc>Ov 6
imap <Esc>Ow 7
imap <Esc>Ox 8
imap <Esc>Oy 9
imap <Esc>Op 0
imap <Esc>On .
imap <Esc>OR *
imap <Esc>OQ /
imap <Esc>Ol +
imap <Esc>OS -


" Enable filetype plugin
filetype plugin on
filetype indent on

" Set x lines to the curors - when moving vertical..
set scrolloff=6

set ruler "Always show current position

set showmatch "Show matching bracets when text indicator is over them
set mat=2 "How many tenths of a second to blink

set number "numerowanie linii
set wildmenu "lepsze dopelnianie polecen, sprawdz w menu
set showcmd "show partially command in status line

" Use backspace as delete in insert mode
set backspace=indent,eol,start

" highlight col #80.
set colorcolumn=80

syntax on
set smartindent

set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set nobackup

set showmode "wyswietla tryb (wprowadzania, wizualny itd.)
set paste "normalne wklejanie, bez przesuwania tekstu"

"" Searching
set hlsearch        " highlight matches
set incsearch       " incremental searching
set ignorecase      " searches are case insensitive...
set smartcase       " ... unless they contain at least one capital letter


set guifont=Lucida_Console:h11:cDEFAULT

""set fileencoding=utf-8 "kodowanie ...
" http://vim.wikia.com/wiki/Working_with_Unicode
if has("multi_byte")
	if &termencoding == ""
		let &termencoding = &encoding
	endif
	set encoding=utf-8
	setglobal fileencoding=utf-8
	"setglobal bomb
	set fileencodings=ucs-bom,utf-8,latin1
endif

" Proper polish characters in gVim Windows menu
" http://superuser.com/questions/746387/change-menu-ui-language-of-vim-to-english
"set langmenu=pl_PL
"let $LANG = 'pl_PL'
source $VIMRUNTIME/delmenu.vim
"source $VIMRUNTIME/menu.via

set history=300 "rozmiar historii polecen

" map tab in normal mode
nmap <Tab> i<Tab><Esc>
" indent visual block with tab
vmap <Tab> :><CR>gv
vmap <S-Tab> :<<CR>gv

"" indent options


" smartindent does the indent in programming
set autoindent "przy nowej linii używaj tego samego wcięcia co w obecnej
set smartindent
set tabstop=4 "na ile spacji powinien być wyświetlany znak tabulacji
set softtabstop=4 "ile spacji wstawiać zamiast tabulatora (patrz: expandtab)
set shiftwidth=4
set expandtab
set noswapfile

" TABs highlighting
set list
set listchars=tab:→\ 
set listchars+=trail:•
set listchars+=extends:»
set listchars+=precedes:«
set listchars+=eol:⌐
if has('patch-7.4.710')
    set listchars+=space:·
endif

highlight Comment ctermfg=darkgreen


" highlight cursor line
set cursorline


" Automatyczna zmiana katalogu do tego, w ktorym jest aktualnie edytowany
" plik. Przydatne gdy chcemy otworzyc inny z tego samego katalogu
" http://vim.sourceforge.net/tip_view.php?tip_id=101
if has("autocmd")
	autocmd BufEnter * :cd %:p:h
endif " has("autocmd")

set t_Co=64

if !has("gui_running")
	let g:solarized_termcolors=256

	if has("unix")
		set background=light "dark
	else
		set background=dark
	endif
else
	set background=light
	set columns=120
	set lines=35
endif

" CTRL-x copy paste etc
if has("win64") || has("win32") || has("win16")
	source $VIMRUNTIME/mswin.vim
	behave mswin
endif


" Lua
autocmd Filetype lua setlocal ts=2 sts=2 sw=2 expandtab


" do not want italic ocmment style [unreadable]
let g:solarized_italic=0

colorscheme solarized

"color of tab and spaces
hi SpecialKey guifg=#93a1a1 guibg=#eee8d5
"color of eol
hi NonText guifg=darkgray

TrackBack

TrackBack URL dla tej wiadomości:
https://blog.kkthx.pl/2014/05/vimrc/trackback/

Napisz komentarz