-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
139 lines (123 loc) · 4.58 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
""" Eklentiler
call plug#begin('~/.vim/plugged')
Plug 'lifepillar/vim-solarized8'
Plug 'skielbasa/vim-material-monokai'
Plug 'xolox/vim-session'
Plug 'xolox/vim-misc'
Plug 'jeetsukumaran/vim-buffergator'
Plug 'joom/turkish-deasciifier.vim'
Plug 'scrooloose/nerdtree'
Plug 'mhartington/oceanic-next'
Plug 'christoomey/vim-tmux-navigator'
Plug 'rbgrouleff/bclose.vim'
call plug#end()
""" Ayarlar
filetype on
filetype plugin on
filetype plugin indent on
filetype indent on
set shell=bash\ --login
syntax on
set background=dark
set nocompatible " don't bother with vi compatibility
set autoread " reload files when changed on disk, i.e. via `git checkout`
set tabstop=2 " tab uzunluğu
set shiftwidth=4 " Görsel modda < ve > karakterlerine basıldığında bloğun ne kadar kaydırılacağı
set softtabstop=2 " boşluklardan oluşan feyk tabın uzunluğu
set expandtab " tab'a basıldığında boşluk karakterlerinden oluşan feyk tab kullanılmasını sağlar.
set lbr " linebreak; satir sonunda alt satira hecelemeyle gecisi saglar
set tw=79 " bir satırın alabileceği karakter sayısı
set magic " For regular expressions turn magic on
noremap <Leader>s :update<CR> " mevcbut buffer'i diske kayededer
let $PAGER='' " man page icin
set clipboard=unnamedplus
set term=tmux-256color
set t_Co=256
"map y "+y
set pastetoggle=<F5> " when in insert mode, press <F5> to go to
" paste mode, where you can paste mass data
" that won't be autoindented
au InsertLeave * set nopaste
""" Eklenti yapilandirma
" Buffergator; buffer'lar arasi gezinme
nnoremap <C-n> :BuffergatorMruCycleNext<cr>
nnoremap <C-p> :BuffergatorMruCyclePrev<cr>
nnoremap <Leader>b :BuffergatorToggle<CR> " acik buffer'lari listele
" turkish-deasciifier; harflerdeki turkceye ozgu karakterlerin, kelimenin anlamina gore eklenip kaldirilmasini saglar.
vmap <Leader>tr :<c-u>call Turkish_Deasciify()<CR>
vmap <Leader>rt :<c-u>call Turkish_Asciify()<CR>
let g:turkish_deasciifier_path = '~/Git_Repolari/diger/turkish-deasciifier/turkish-deasciify'
""" Nerdtree dizin/dosya paneli
" Leader key ile acma
"" map <Leader>n :NERDTreeMapToggleHidden<CR>
map <Leader>n :NERDTreeToggle<CR>
" Sadece NERDTREE penceresi aciksa Vim'i otomatik kapat;
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
let g:NERDTreeMapJumpNextSibling = ''
let g:NERDTreeMapJumpPrevSibling = ''
let g:NERDTreeMapJumpLastChild = ''
let g:NERDTreeMapJumpFirstChild = ''
let g:NERDTreeWinSize=31
let g:NERDTreeDirArrows=0
" vim-tmux-navigator; tmux pane'leri arasinda vim kisayollariyla gezinme
if exists('$TMUX')
function! TmuxOrSplitSwitch(wincmd, tmuxdir)
let previous_winnr = winnr()
silent! execute "wincmd " . a:wincmd
if previous_winnr == winnr()
call system("tmux select-pane -" . a:tmuxdir)
redraw!
endif
endfunction
let previous_title = substitute(system("tmux display-message -p '#{pane_title}'"), '\n', '', '')
let &t_ti = "\<Esc>]2;vim\<Esc>\\" . &t_ti
let &t_te = "\<Esc>]2;". previous_title . "\<Esc>\\" . &t_te
nnoremap <silent> <C-h> :call TmuxOrSplitSwitch('h', 'L')<cr>
nnoremap <silent> <C-j> :call TmuxOrSplitSwitch('j', 'D')<cr>
nnoremap <silent> <C-k> :call TmuxOrSplitSwitch('k', 'U')<cr>
nnoremap <silent> <C-l> :call TmuxOrSplitSwitch('l', 'R')<cr>
else
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
endif
""" Görünüm
hi Normal guifg=#93a1a1 " metin gorunum rengi
hi StatusLine cterm=none gui=none
hi StatusLineNC cterm=none gui=none
hi VertSplit ctermfg=00
hi SignColumn ctermbg=none
hi Search ctermfg=25 ctermbg=16
hi Folded ctermfg=25 ctermbg=16
hi NonText ctermfg=00
hi clear SignColumn
hi TabLineFill cterm=none gui=none
hi TabLine ctermfg=none ctermbg=none
hi TabLineSel ctermfg=none ctermbg=none
set statusline=%t\ %=\ %l:%c
set fillchars+=vert:│
"""" Window'u acik tut, buffer yonet
" buffer'i kaydet
nnoremap <Leader>w :w<bar>:Bclose!<cr>
" buffer'i kaydetme
nnoremap <Leader>q :Bclose!<cr>
" buffer'lari kaydet
noremap <Leader>s :wall<CR>
"noremap <Leader>e :wall<CR>
"""" Window'u kapatip buffer yonet
" buffer'i kaydet
noremap <S-w> :wqall!<CR>
" buffer'lari kaydetme
noremap <S-q> :bdelete!<cr>
noremap <S-e> :qall!<cr>
"colorscheme OceanicNext
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
" Vim session
let g:session_autosave= 'no'
let g:session_autoload = 'yes'
"set sessionoptions=buffers