前提

 

要有 vimtweak.dll放在gvim.exe相同的文件夹里面,背景才能透明化

下载地址:

https://www.vim.org/scripts/download_script.php?src_id=2103

 

补全按tab,我是用来写verilog文件的

f2出目录树

 

 

 

 

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=$VIM/vimfiles/bundle/Vundle.vim/
call vundle#begin('$VIM/vimfiles/bundle/')
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" plugin on GitHub repo
Plugin 'altercation/vim-colors-solarized'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line


" Startup {{{
filetype indent plugin on


" vim 文件折叠方式为 marker
augroup ft_vim
    au!

    au FileType vim setlocal foldmethod=marker
augroup END
" }}}

" General {{{
set nocompatible
set nobackup
set noswapfile
set history=1024
set autochdir
set whichwrap=b,s,<,>,[,]
set nobomb
set backspace=indent,eol,start whichwrap+=<,>,[,]
" Vim 的默认寄存器和系统剪贴板共享
set clipboard+=unnamed
" 设置 alt 键不映射到菜单栏
set winaltkeys=no
" }}}


" Lang & Encoding {{{
set fileencodings=utf-8,gbk2312,gbk,gb18030,cp936
set encoding=utf-8
set langmenu=zh_CN
let $LANG = 'en_US.UTF-8'
"language messages zh_CN.UTF-8
" }}}

" GUI {{{

source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
set cursorline
set hlsearch
set number
" 窗口大小
set lines=50 columns=150
" 分割出来的窗口位于当前窗口下边/右边
set splitbelow
set splitright
"不显示工具/菜单栏
"set guioptions-=T
"set guioptions-=m
"set guioptions-=L
"set guioptions-=r
"set guioptions-=b
" 使用内置 tab 样式而不是 gui
set guioptions-=e
set nolist
" set listchars=tab:▶\ ,eol:¬,trail:·,extends:>,precedes:<
set guifont=Inconsolata:h12:cANSI
" }}}


"显示行号
    set nu

    "开启高亮
    syntax on

    "突出显示当前行
    set cursorline

    "启用鼠标
    set mouse=a
    set selection=exclusive
    set selectmode=mouse,key

    "显示状态栏
    set laststatus=2

    "显示光标当前位置
    set ruler

    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
        Plugin 'VundleVim/Vundle.vim'
        Plugin 'scrooloose/nerdtree'
        "Plugin 'jistr/vim-nerdtree-tabs'
        "Plugin 'Xuyuanp/nerdtree-git-plugin'
        "Plugin 'kien/ctrlp.vim'
        "Plugin 'eshion/vim-sync'
        Plugin 'vim-airline/vim-airline'
        Plugin 'joshdick/onedark.vim'
        "Plugin 'connorholyday/vim-snazzy'
        
        Plugin 'tiagofumo/vim-nerdtree-syntax-highlight' " 目录树美化
        Plugin 'tpope/vim-commentary'     
        Plugin 'luochen1990/rainbow'  
        "Plugin 'Raimondi/delimitMate' 
        Plugin 'lifepillar/vim-mucomplete'
        "Plugin 'Valloric/YouCompleteMe'
        
    
    call vundle#end()

    " NerdTree才插件的配置信息
    ""将F2设置为开关NERDTree的快捷键
    map <f2> :NERDTreeToggle<cr>
    ""修改树的显示图标
    let g:NERDTreeDirArrowExpandable = '+'
    let g:NERDTreeDirArrowCollapsible = '-'
    ""窗口位置
    let g:NERDTreeWinPos='right'
    ""窗口尺寸
    let g:NERDTreeSize=30
    ""窗口是否显示行号
    let g:NERDTreeShowLineNumbers=1
    ""不显示隐藏文件
    let g:NERDTreeHidden=0
    
    
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
if (empty($TMUX))
  if (has("nvim"))
    "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
    let $NVIM_TUI_ENABLE_TRUE_COLOR=1
  endif
  "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
  "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
  " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
  if (has("termguicolors"))
    set termguicolors
  endif
endif

syntax on
colorscheme onedark
let g:lightline = {
  \ 'colorscheme': 'onedark',
  \ }

set guifont=Consolas:b:h18
"背景透明
au GUIEnter * call libcallnr("vimtweak.dll", "SetAlpha", 248) 

"GUI设置完毕
"下面设置快捷键
inoremap (  ()<esc>i
inoremap [  []<esc>i
inoremap "  ""<esc>i
inoremap '  ''<esc>i


"nnoremap <c-h> <c-w>h  
"nnoremap <c-l> <c-w>l  
"nnoremap <c-j> <c-w>j  
"nnoremap <c-k> <c-w>k

"noremap k j
"noremap i k 
"noremap j h 
"noremap ; i

noremap K 5k
noremap J 5j 
noremap L 5l
noremap H 5h

noremap s <nop>
noremap <c-s> :w<CR>

noremap - $

 

Vim配置 For windows-git-bundle

相关文章: