My 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.
 
 

212 lines
5.6 KiB

" Vim with all enhancements
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
" Use the internal diff if available.
" Otherwise use the special 'diffexpr' for Windows.
if &diffopt !~# 'internal'
set diffexpr=MyDiff()
endif
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg1 = substitute(arg1, '!', '\!', 'g')
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg2 = substitute(arg2, '!', '\!', 'g')
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let arg3 = substitute(arg3, '!', '\!', 'g')
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
if empty(&shellxquote)
let l:shxq_sav = ''
set shellxquote&
endif
let cmd = '"' . $VIMRUNTIME . '\diff"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
let cmd = substitute(cmd, '!', '\!', 'g')
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
if exists('l:shxq_sav')
let &shellxquote=l:shxq_sav
endif
endfunction
" An example for a gvimrc file.
" The commands in this are executed when the GUI is started, after the vimrc
" has been executed.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2016 Apr 05
"
" To use it, copy it to
" for Unix and OS/2: ~/.gvimrc
" for Amiga: s:.gvimrc
" for MS-DOS and Win32: $VIM\_gvimrc
" for OpenVMS: sys$login:.gvimrc
" Make external commands work through a pipe instead of a pseudo-tty
"set noguipty
" set the X11 font to use
" set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
set ch=2 " Make command line two lines high
set mousehide " Hide the mouse when typing text
" Make shift-insert work like in Xterm
" map <S-Insert> <MiddleMouse>
" map! <S-Insert> <MiddleMouse>
" Only do this for Vim version 5.0 and later.
if version >= 500
" Switch on syntax highlighting if it wasn't on yet.
if !exists("syntax_on")
syntax on
endif
" For Win32 version, have "K" lookup the keyword in a help file
"if has("win32")
" let winhelpfile='windows.hlp'
" map K :execute "!start winhlp32 -k <cword> " . winhelpfile <CR>
"endif
" Set nice colors
" background for normal text is light grey
" Text below the last line is darker grey
" Cursor is green, Cyan when ":lmap" mappings are active
" Constants are not underlined but have a slightly lighter background
" highlight Normal guibg=Black
" highlight Cursor guibg=Black guifg=Black
" highlight lCursor guibg=Cyan guifg=Black
" highlight NonText guibg=Black guifg=Black
" highlight Constant gui=NONE guibg=Black
" highlight Special gui=NONE guibg=Black
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"=> Trailing spaces
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"function! CleanExtraSpaces() "Function to clean unwanted spaces
" let save_cursor = getpos(".")
" let old_query = getreg('/')
" silent! %s/\s\+$//e
" call setpos('.', save_cursor)
" call setreg('/', old_query)
"endfun
"autocmd BufWritePre * :call CleanExtraSpaces()
"if (&diff==0)
" :autocmd BufReadPost * tab ball
"endif
set history=50
if has('gui_running')
""set guifont=Lucida_Console:h10
set lines=30 columns=100
set guifont=DroidSansMono_Nerd_Font:h11
endif
""set guifont=Lucida_Console:h10
filetype plugin on
set omnifunc=syntaxcomplete#Complete
set nobackup
set nowritebackup
set noswapfile
set noundofile
"set equalalways
set path+=**
set encoding=utf8
set number relativenumber
map <C-o> :NERDTreeToggle<CR>
set autoread
set viminfo=""
set wrap
set linebreak
set textwidth=0
set wrapmargin=0
set formatoptions-=t
set wildmenu
set wildmode=longest,list,full
set noendofline
set clipboard=unnamedplus
au BufWritePre * :set binary | set noeol
au BufWritePost * :set nobinary | set eol
autocmd! bufwritepost /home/vmware/.vimrc source %
" Automatically deletes all trailing whitespace and newlines at end of file on save.
" autocmd BufWritePre * %s/\s\+$//e
" autocmd BufWritePre * %s/\n\+\%$//e
" View all whitespaces
"
"set syntax=whitespace
"set listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣
"set list
let g:airline_powerline_fonts = 1
set rop=type:directx,gamma:1.0,contrast:0.5,level:1,geom:1,renmode:4,taamode:1
let g:airline_theme='murmur'
""source /home/vmware/.vim/colors/hacker.vim
source /home/vmware/.vim/colors/DarkModeReloaded.vim
set guiheadroom=0
autocmd BufReadPre *.nfo :setlocal fileencodings=cp437,utf-8
autocmd BufReadPre *.nfo_original :setlocal fileencodings=cp437,utf-8
function! s:DiffWithSaved()
let filetype=&ft
diffthis
vnew | r # | normal! 1Gdd
diffthis
exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
endfunction
com! DiffSaved call s:DiffWithSaved()
"source /home/vmware/.vim/pluginconfig/vim-deoplete.vim
"source /home/vmware/.vim/pluginconfig/vim-netrw.vim
source /home/vmware/.vim/pluginconfig/vim-ale.vim
"source /home/vmware/.vim/pluginconfig/vim-syntastic.vim
source /home/vmware/.vim/pluginconfig/vim-devicons.vim
source /home/vmware/.vim/pluginconfig/vim-gitgutter.vim
source /home/vmware/.vim/pluginconfig/vim-keymaps.vim
source /home/vmware/.vim/pluginconfig/vim-nerdtree.vim
"source /home/vmware/.vim/pluginconfig/vim-fern.vim
source /home/vmware/.vim/pluginconfig/vim-coc.vim
source /home/vmware/.vim/pluginconfig/vim-plug.vim