mirror of https://github.com/tiyn/dotfiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.8 KiB
81 lines
2.8 KiB
4 years ago
|
" Begin Plugin section
|
||
|
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
|
||
|
echo "Downloading junegunn/vim-plug to manage plugins..."
|
||
|
silent !mkdir -p ~/.config/nvim/autoload/
|
||
|
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
|
||
|
endif
|
||
|
|
||
|
call plug#begin('~/.config/nvim/plugged')
|
||
|
Plug 'qpkorr/vim-renamer'
|
||
|
Plug 'tomasiser/vim-code-dark'
|
||
|
call plug#end()
|
||
|
|
||
|
" End Plugin section
|
||
|
|
||
|
let mapleader =","
|
||
|
|
||
|
set go=a
|
||
|
set mouse=a
|
||
|
set ignorecase
|
||
|
" Some basics:
|
||
|
nnoremap c "_c
|
||
|
set nocompatible
|
||
|
filetype plugin on
|
||
|
syntax on
|
||
|
set encoding=utf-8
|
||
|
set number relativenumber
|
||
|
" Enable autocompletion:
|
||
|
set wildmode=longest,list,full
|
||
|
" Disables automatic commenting on newline:
|
||
|
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||
|
" Setting Tab-length
|
||
|
set tabstop=4
|
||
|
set softtabstop=4
|
||
|
set shiftwidth=4
|
||
|
|
||
|
colorscheme codedark
|
||
|
|
||
|
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
|
||
|
set splitbelow splitright
|
||
|
|
||
|
" Mapping Dictionaries
|
||
|
map <F5> :setlocal spell! spelllang=de<CR>
|
||
|
map <F6> :set spelllang=en_us<CR>
|
||
|
|
||
|
""" Shortcuts
|
||
|
" Navigating with guides
|
||
|
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||
|
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||
|
map <leader><leader> <Esc>/<++><Enter>"_c4l
|
||
|
|
||
|
" Navigating with guides
|
||
|
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||
|
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||
|
map <leader><leader> <Esc>/<++><Enter>"_c4l
|
||
|
|
||
|
"""HTML
|
||
|
autocmd BufRead,BufNewFile *.html set filetype=html
|
||
|
|
||
|
autocmd FileType html inoremap ,b <b></b><Space><++><Esc>FbT>i
|
||
|
autocmd FileType html inoremap ,it <em></em><Space><++><Esc>FeT>i
|
||
|
autocmd FileType html inoremap ,1 <h1></h1><Enter><Enter><++><Esc>2kf<i
|
||
|
autocmd FileType html inoremap ,2 <h2></h2><Enter><Enter><++><Esc>2kf<i
|
||
|
autocmd FileType html inoremap ,3 <h3></h3><Enter><Enter><++><Esc>2kf<i
|
||
|
autocmd FileType html inoremap ,p <p></p><Enter><Enter><++><Esc>02kf>a
|
||
|
autocmd FileType html inoremap ,a <a<Space>href=""><++></a><Space><++><Esc>14hi
|
||
|
autocmd FileType html inoremap ,e <a<Space>target="_blank"<Space>href=""><++></a><Space><++><Esc>14hi
|
||
|
autocmd FileType html inoremap ,ul <ul><Enter><li></li><Enter></ul><Enter><Enter><++><Esc>03kf<i
|
||
|
autocmd FileType html inoremap ,li <Esc>o<li></li><Esc>F>a
|
||
|
autocmd FileType html inoremap ,ol <ol><Enter><li></li><Enter></ol><Enter><Enter><++><Esc>03kf<i
|
||
|
autocmd FileType html inoremap ,im <img src="" alt="<++>"><++><esc>Fcf"a
|
||
|
autocmd FileType html inoremap &<space> &<space>
|
||
|
autocmd FileType html inoremap ä ä
|
||
|
autocmd FileType html inoremap ö ö
|
||
|
autocmd FileType html inoremap ü ü
|
||
|
autocmd FileType html inoremap Ä Ä
|
||
|
autocmd FileType html inoremap Ö Ö
|
||
|
autocmd FileType html inoremap Ü Ü
|
||
|
|
||
|
" Delete trailing whitespaces on save
|
||
|
autocmd BufWritePre * %s/\s\+$//e
|