diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2020-02-10 20:42:07 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2020-02-10 20:42:07 +0100 |
commit | b6f020fb79a8dec66387d7f63f1719c0736850b1 (patch) | |
tree | d9472f3307115fb0bc5a84457af9906a62872088 | |
parent | add license (diff) | |
download | dotfiles-b6f020fb79a8dec66387d7f63f1719c0736850b1.tar.gz dotfiles-b6f020fb79a8dec66387d7f63f1719c0736850b1.tar.bz2 dotfiles-b6f020fb79a8dec66387d7f63f1719c0736850b1.tar.xz dotfiles-b6f020fb79a8dec66387d7f63f1719c0736850b1.tar.zst dotfiles-b6f020fb79a8dec66387d7f63f1719c0736850b1.zip |
nuvim
-rw-r--r-- | .vimrc | 133 | ||||
-rw-r--r-- | init.vim | 3 |
2 files changed, 78 insertions, 58 deletions
@@ -2,8 +2,10 @@ let mapleader="," " Plugins call plug#begin('~/.vim/plugged') +Plug 'mbbill/undotree' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' +Plug 'jiangmiao/auto-pairs' call plug#end() " Some basics: @@ -20,8 +22,10 @@ call plug#end() filetype plugin indent on set encoding=utf-8 set number + set relativenumber set ruler syntax on + colo peachpuff set hidden " Enable autocompletion: @@ -39,7 +43,7 @@ call plug#end() let g:airline_detect_paste = 1 let g:airline_detect_crypt = 1 let g:airline_theme = 'term' - let g:airline_powerline_fonts = 1 + "let g:airline_powerline_fonts = 1 let g:airline_symbols_ascii = 1 let g:airline#parts#ffenc#skip_expected_string='utf-8[unix]' @@ -97,17 +101,17 @@ call plug#end() autocmd FileType cpp noremap <F10> :w<CR> :!clear<CR> :!~/.vim/cpp/f10.sh %<CR> " === Comfy === " C - autocmd FileType c inoremap " ""<left> - autocmd FileType c inoremap ' ''<left> - autocmd FileType c inoremap ( ()<left> - autocmd FileType c inoremap [ []<left> - autocmd FileType c inoremap { {}<left> - autocmd FileType c inoremap < <><left> - autocmd FileType c inoremap {<CR> {<CR>}<ESC>O - autocmd FileType c inoremap {;<CR> {<CR>};<ESC>O - autocmd FileType c inoremap <<space> <<space> - autocmd FileType c inoremap ><space> ><space> - autocmd FileType c inoremap <= <= + "autocmd FileType c inoremap " ""<left> + "autocmd FileType c inoremap ' ''<left> + "autocmd FileType c inoremap ( ()<left> + "autocmd FileType c inoremap [ []<left> + "autocmd FileType c inoremap { {}<left> + "autocmd FileType c inoremap < <><left> + "autocmd FileType c inoremap {<CR> {<CR>}<ESC>O + "autocmd FileType c inoremap {;<CR> {<CR>};<ESC>O + "autocmd FileType c inoremap <<space> <<space> + "autocmd FileType c inoremap ><space> ><space> + "autocmd FileType c inoremap <= <= autocmd FileType c nnoremap <Leader>m o#include<space><stdio.h><CR>#include<space><string.h><CR>#include<space><stdlib.h><CR>#include<space><stddef.h><CR>int<space>main(void)<space>{<CR>return<space>0;<CR>}<up><ESC>O autocmd FileType c nnoremap <Leader>M o#include<space><stdio.h><CR>#include<space><string.h><CR>#include<space><stdlib.h><CR>#include<space><stddef.h><CR>int<space>main(int<space>argc,<space>char<space>*argv[])<space>{<CR>if<space>(argc<space>!=<space>1)<space>{<CR>printf("NOT<space>ENOUGH<space>ARGS\n");<CR>return<space>1;<CR>}<CR>return<space>0;<CR>}<up><ESC>Oprintf();<left><left> @@ -115,64 +119,77 @@ call plug#end() autocmd FileType cpp noremap <silent> <F8> :w<CR>:!g++<space>-Wall<space>-Wextra<space>-Werror -O3 % <CR> autocmd FileType cpp noremap <F9> :w<CR>:!g++ -Wall -Wextra -Werror -O3 %; ./a.out ; echo "~>\n\n.vimrc 2.3.1-release Tilde Edition by Joe"; rm a.out<left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left> autocmd FileType cpp noremap <F10> :w<CR>:!g++ -Wall -Wextra -Werror -O3 %; ./a.out; echo "~>\n\n.vimrc 2.3.1-release Tilde Edition by Joe"; rm a.out<CR> - autocmd FileType cpp inoremap " ""<left> - autocmd FileType cpp inoremap ' ''<left> - autocmd FileType cpp inoremap ( ()<left> - autocmd FileType cpp inoremap [ []<left> - autocmd FileType cpp inoremap { {}<left> - autocmd FileType cpp inoremap < <><left> - autocmd FileType cpp inoremap {<CR> {<CR>}<ESC>O - autocmd FileType cpp inoremap {;<CR> {<CR>};<ESC>O - autocmd FileType cpp inoremap <<space> <<space> - autocmd FileType cpp inoremap << <<<space> - autocmd FileType cpp inoremap ><space> ><space> - autocmd FileType cpp inoremap >> >><space> - autocmd FileType cpp inoremap <= <= + ""autocmd FileType cpp inoremap " ""<left> + ""autocmd FileType cpp inoremap ' ''<left> + ""autocmd FileType cpp inoremap ( ()<left> + ""autocmd FileType cpp inoremap [ []<left> + ""autocmd FileType cpp inoremap { {}<left> + ""autocmd FileType cpp inoremap < <><left> + ""autocmd FileType cpp inoremap {<CR> {<CR>}<ESC>O + ""autocmd FileType cpp inoremap {;<CR> {<CR>};<ESC>O + ""autocmd FileType cpp inoremap <<space> <<space> + ""autocmd FileType cpp inoremap << <<<space> + ""autocmd FileType cpp inoremap ><space> ><space> + ""autocmd FileType cpp inoremap >> >><space> + ""autocmd FileType cpp inoremap <= <= autocmd FileType cpp nnoremap <Leader>m oint<space>main(void)<space>{<CR>return<space>0;<CR>}<up><ESC>O autocmd FileType cpp nnoremap <Leader>M oint<space>main(int<space>argc,<space>char<space>*argv[])<space>{<CR>if<space>(argc<space>!=<space>1)<CR>return<space>0;<CR>if<space>(argv[])<space>{}<CR>return<space>0;<CR>}<up><ESC>O autocmd FileType cpp nnoremap <Leader>M oint<space>main(int<space>argc,<space>char<space>*argv[])<space>{<CR>if<space>(argc<space>!=<space>1)<space>{<CR>cout<space><<<space>"NOT<space>ENOUGH<space>ARGS"<space><<<space>endl;<CR>return<space>1;<CR>}<CR>return<space>0;<CR>}<up><ESC>O +" Java + ""autocmd FileType java inoremap " ""<left> + ""autocmd FileType java inoremap ' ''<left> + ""autocmd FileType java inoremap ( ()<left> + ""autocmd FileType java inoremap [ []<left> + ""autocmd FileType java inoremap { {}<left> + ""autocmd FileType java inoremap < <><left> + ""autocmd FileType java inoremap {<CR> {<CR>}<ESC>O + ""autocmd FileType java inoremap {;<CR> {<CR>};<ESC>O + ""autocmd FileType java inoremap <<space> <<space> + ""autocmd FileType java inoremap ><space> ><space> + ""autocmd FileType java inoremap <= <= + " = Web = " HTML - autocmd FileType html inoremap " ""<left> - autocmd FileType html inoremap ' ''<left> - autocmd FileType html inoremap ( ()<left> - autocmd FileType html inoremap [ []<left> - autocmd FileType html inoremap { {}<left> - autocmd FileType html inoremap {<CR> {<CR>}<ESC>O - autocmd FileType html inoremap < <><left> + "autocmd FileType html inoremap " ""<left> + "autocmd FileType html inoremap ' ''<left> + "autocmd FileType html inoremap ( ()<left> + "autocmd FileType html inoremap [ []<left> + "autocmd FileType html inoremap { {}<left> + "autocmd FileType html inoremap {<CR> {<CR>}<ESC>O + "autocmd FileType html inoremap < <><left> " PHP - autocmd FileType php inoremap " ""<left> - autocmd FileType php inoremap ' ''<left> - autocmd FileType php inoremap ( ()<left> - autocmd FileType php inoremap [ []<left> - autocmd FileType php inoremap { {}<left> - autocmd FileType php inoremap {<CR> {<CR>}<ESC>O - autocmd FileType php inoremap < <><left> - autocmd FileType php inoremap <? <?php ?><left><left><left> - autocmd FileType php inoremap <?<CR> <?php<CR>?><ESC>O + ""autocmd FileType php inoremap " ""<left> + ""autocmd FileType php inoremap ' ''<left> + ""autocmd FileType php inoremap ( ()<left> + ""autocmd FileType php inoremap [ []<left> + ""autocmd FileType php inoremap { {}<left> + ""autocmd FileType php inoremap {<CR> {<CR>}<ESC>O + ""autocmd FileType php inoremap < <><left> + ""autocmd FileType php inoremap <? <?php ?><left><left><left> + ""autocmd FileType php inoremap <?<CR> <?php<CR>?><ESC>O " CSS - autocmd FileType css inoremap " ""<left> - autocmd FileType css inoremap ' ''<left> - autocmd FileType css inoremap ( ()<left> - autocmd FileType css inoremap [ []<left> - autocmd FileType css inoremap { {}<left> - autocmd FileType css inoremap {<CR> {<CR>}<ESC>O + "autocmd FileType css inoremap " ""<left> + "autocmd FileType css inoremap ' ''<left> + "autocmd FileType css inoremap ( ()<left> + "autocmd FileType css inoremap [ []<left> + "autocmd FileType css inoremap { {}<left> + "autocmd FileType css inoremap {<CR> {<CR>}<ESC>O " Just in case - inoremap " ""<left> - inoremap ' ''<left> - inoremap ( ()<left> - inoremap [ []<left> - inoremap { {}<left> - inoremap "" "" - inoremap '' '' - inoremap () () - inoremap [] [] - inoremap {} {} - inoremap <> <> + "inoremap " ""<left> + "inoremap ' ''<left> + "inoremap ( ()<left> + "inoremap [ []<left> + "inoremap { {}<left> + "inoremap "" "" + "inoremap '' '' + "inoremap () () + "inoremap [] [] + "inoremap {} {} + "inoremap <> <> " .vimrc 2.4.1-release | Copyright Joe 2k19 diff --git a/init.vim b/init.vim new file mode 100644 index 0000000..f182e5b --- /dev/null +++ b/init.vim @@ -0,0 +1,3 @@ +set runtimepath^=~/.vim runtimepath+=~/.vim/after +let &packpath = &runtimepath +source ~/.vimrc |