1
0

split up some configuration files from my_vim.vim

This commit is contained in:
valeth 2015-06-16 23:09:32 +02:00
parent fc381e38d1
commit 037e21abed
21 changed files with 112 additions and 5 deletions

3
core/bell.vim Normal file
View File

@ -0,0 +1,3 @@
" disable visualbell
set visualbell
set t_vb=

1
core/clipboard.vim Normal file
View File

@ -0,0 +1 @@
set clipboard=unnamed,unnamedplus,autoselect

5
core/cmdline_info.vim Normal file
View File

@ -0,0 +1,5 @@
" show a ruler and show the current command in the bottom right
if has('cmdline_info')
set ruler
set showcmd
endif

4
core/encoding.vim Normal file
View File

@ -0,0 +1,4 @@
if has('multi_byte')
set encoding=utf-8
set termencoding=utf-8
endif

View File

@ -2,4 +2,5 @@ imap jk <ESC>
imap JK <ESC>
imap Jk <ESC>
set ttimeout
set timeoutlen=500

4
core/history.vim Normal file
View File

@ -0,0 +1,4 @@
" set the history far higher (default 50)
if &history < 1000
set history=1000
endif

View File

@ -1,3 +1,5 @@
set number
if v:version >= 704
aug LineNumbers
au!

View File

@ -1,5 +1,5 @@
if has("linebreak")
let &showbreak = "↳ "
if has('linebreak')
let &showbreak = '↳ '
set breakindent
set breakindentopt=sbr
endif

32
core/misc.vim Normal file
View File

@ -0,0 +1,32 @@
set backspace=indent,eol,start
set complete-=i
set nrformats-=octal
set shiftround
set display+=lastline
set showmatch
set shortmess=aoOtTI
set autochdir
set report=0
set updatetime=1500
set switchbuf=useopen,usetab
set pumheight=10
set diffopt+=context:3
set matchtime=2
" set the terminal colors to 256 if not in a VT
if exists($TERM)
if &t_Co == 8 && $TERM !~# '^linux'
set t_Co=256
endif
endif
if &listchars ==# 'eol:$'
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
endif
" load the matchit macros
if !exists('g:loaded_matchit') && findfile('plugins/matchit.vim', &rtp) ==# ''
runtime! macros/matchit.vim
endif

4
core/mouse.vim Normal file
View File

@ -0,0 +1,4 @@
" enable mouse support
if has('mouse')
set mouse=a
endif

10
core/scrolling.vim Normal file
View File

@ -0,0 +1,10 @@
" set scroll offset slightly higher so that the next or previous line can be seen
if !&scrolloff
set scrolloff=1
endif
" same as with scroll offset but for horizontal scrolling
if !&sidescrolloff
set sidescrolloff=5
endif

View File

@ -1,2 +1,11 @@
set ignorecase
set smartcase
" highlight searches and search while typing
if has('extra_search')
set hlsearch
set incsearch
if maparg('<C-L>', 'n') ==# ''
nnoremap <silent><C-L> :nohlsearch<CR><C-L>
endif
endif

5
core/split.vim Normal file
View File

@ -0,0 +1,5 @@
" split the windows more 'naturally'
if has('windows')
set splitbelow
set splitright
endif

2
core/statusline.vim Normal file
View File

@ -0,0 +1,2 @@
" always show a status line
set laststatus=2

View File

@ -0,0 +1,9 @@
" enable filetype plugins
if has('autocmd')
filetype plugin indent on
endif
" enable syntax highlighting
if has('syntax')
syntax enable
endif

View File

@ -4,3 +4,8 @@ nnoremap tk :tabprev<CR>
nnoremap tl :tablast<CR>
nnoremap tn :tabnew<CR>
nnoremap tq :tabclose<CR>
" increase the maximal number of tabpages (default 10)
if &tabpagemax < 50
set tabpagemax=50
endif

View File

@ -1,6 +1,8 @@
"set softtabstop=4
"set shiftwidth=4
"set expandtab
set autoindent
set smarttab
if has("smartindent")
set smartindent

4
core/visual.vim Normal file
View File

@ -0,0 +1,4 @@
" allow the cursor to be positioned where no characters are in virtual block mode
if has('virtualedit')
set virtualedit=block
endif

View File

@ -1,2 +1,6 @@
set wildmode=longest:full,list
set wildignore=.bak,.old,.swp,~
if has('wildmenu')
set wildmenu
endif

View File

@ -1,5 +1,6 @@
set confirm
set autowrite
set autoread
command! Wq wq
command! WQ wq