Browse Source

Füge init.vim hinzu

master
Schneider 6 years ago
parent
commit
a9730f314d
  1. 108
      init.vim

108
init.vim

@ -0,0 +1,108 @@
set nocompatible " be iMproved, required
filetype off " required
" Plugins
" Load vim-plug
if empty(glob("~/.config/nvim/autoload/plug.vim"))
execute '!curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
endif
call plug#begin()
Plug 'VundleVim/Vundle.vim' " let Vundle manage Vundle, required
Plug 'tpope/vim-fugitive' " Git integration
Plug 'tpope/vim-sensible' " Defaults everyone can agree on
Plug 'tpope/vim-surround' " better handling of surrounding markers
Plug 'tpope/vim-ragtag' " Enhancement of surround for html
Plug 'tpope/vim-repeat' " repeat last command with .
Plug 'scrooloose/nerdcommenter' " better commenting
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " completion engine
Plug 'Shougo/neosnippet.vim' " snippet engine
Plug 'Shougo/neosnippet-snippets' " snippets
Plug 'easymotion/vim-easymotion' " better motion with leader
Plug 'bling/vim-airline' " statusline
Plug 'w0rp/ale' " asynchronous linting engine
Plug 'godlygeek/tabular' " Align text on symbols
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } " fuzzy file finder
Plug 'junegunn/fzf.vim' " vim integration for fzf
Plug 'airblade/vim-gitgutter' " git status in gutter column
" All of your Plugins must be added before the following line
call plug#end() " required
filetype plugin indent on " required
" SETTINGS
set number " line numbers
set autoread " reload file automatically
set history=1000
set autoindent " automatically set indent of new line
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set ttyfast " faster redrawing
set diffopt+=vertical
set laststatus=2 " show the satus line all the time
set so=7 " set 7 lines to the cursors - when moving vertical
set wildmenu " enhanced command line completion
set hidden " current buffer can be put into background
set showcmd " show incomplete commands
set wildmode=list:longest " complete files like a shell
set scrolloff=3 " lines of text around cursor
set shell=$SHELL
set cmdheight=1 " command bar height
set title " set terminal title
set foldmethod=marker" " folds are marked with {{{}}}
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
endif
" SETTINGS
let mapleader = ","
" fzf bindings
nmap <C-p> :Files<CR>
nmap <leader><C-p> :Tags<CR>
" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %
" Show Infos from ALE in Airline
let g:airline#extensions#ale#enabled = 1
" Completion settings
let g:deoplete#enable_at_startup = 1
" Use TAB to cycle between matches
inoremap <silent><expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <silent><expr><s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
let g:deoplete#ignore_sources = get(g:, 'deoplete#ignore_sources', {})
let g:deoplete#ignore_sources.php = ['omni']
" Neosnippet Settings
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
" SuperTab like snippets behavior.
"imap <expr><TAB>
" \ pumvisible() ? "\<C-n>" :
" \ neosnippet#expandable_or_jumpable() ?
" \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
" For conceal markers.
if has('conceal')
set conceallevel=2 concealcursor=niv
endif
let g:neosnippet#snippets_directory = '~/.dotfiles/vim/neosnippets'
Loading…
Cancel
Save