Skip to content

Instantly share code, notes, and snippets.

@Kraks
Last active June 18, 2022 01:54
Show Gist options
  • Select an option

  • Save Kraks/b3cd3d856c67b706aea49e7c9e50f923 to your computer and use it in GitHub Desktop.

Select an option

Save Kraks/b3cd3d856c67b706aea49e7c9e50f923 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'https://github.com/wincent/command-t'
" git repos on your local machine (i.e. when working on your own plugin)
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Avoid a name conflict with L9
" Plugin 'user/L9', {'name': 'newL9'}
" Packages installed by kraks
" Plugin 'vim-ocaml-conceal'
" Plugin 'vrackets'
Plugin 'dracula/vim'
Plugin 'mangeshrex/uwu.vim'
Plugin 'https://github.com/wlangstroth/vim-racket.git'
Plugin 'https://github.com/scrooloose/nerdtree.git'
Plugin 'https://github.com/ctrlpvim/ctrlp.vim.git'
Bundle 'derekwyatt/vim-scala'
Bundle 'molokai'
Plugin 'vim-airline/vim-airline'
Plugin 'hynek/vim-python-pep8-indent'
Bundle 'cypok/vim-sml'
Bundle 'https://github.com/chriskempson/vim-tomorrow-theme.git'
Bundle 'https://github.com/guns/vim-clojure-static.git'
Bundle 'https://github.com/tpope/vim-markdown.git'
Bundle 'https://github.com/idris-hackers/idris-vim.git'
Bundle 'https://github.com/mlr-msft/vim-loves-dafny.git'
Bundle 'https://github.com/neovimhaskell/haskell-vim.git'
Bundle 'https://github.com/jvoorhis/coq.vim.git'
Bundle 'https://github.com/let-def/vimbufsync.git'
Bundle 'https://github.com/trefis/coquille.git'
Bundle 'https://github.com/souffle-lang/souffle.vim.git'
Bundle 'https://github.com/rhysd/vim-grammarous.git'
Bundle 'https://github.com/airblade/vim-gitgutter.git'
if 0
i
.
endif
" All of your Plugins must be added before the following line
call vundle#end() " required
color molokai
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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set go=
set ic
set nu
syntax on
set hlsearch
set incsearch
set expandtab
set tabstop=2
set shiftwidth=2
set fileencodings=utf-8,gbk
autocmd FileType c,cpp,lex,yacc set cindent
autocmd FileType c,cpp,lex,yacc set autoindent
autocmd FileType c,cpp,lex,yacc set tabstop=2
autocmd FileType c,cpplex,yacc set shiftwidth=2
set rtp^="/Users/kraks/.opam/system/share/ocp-indent/vim"
autocmd FileType scala,ocaml,sml,haskell set tabstop=2
autocmd FileType scala,ocaml,sml,haskell set shiftwidth=2
au filetype scheme set lisp
au filetype scheme set autoindent
au BufReadPost *.scrbl set syntax=scheme
au FileType python setlocal formatprg=autopep8\ -
set cursorline
"vim-powerline
set laststatus=2
set t_Co=256
set encoding=utf8
let g:airline_powerline_fonts = 1
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" racket
if has("autocmd")
au BufReadPost *.rkt,*.rktl set filetype=racket
au filetype racket set lisp
au filetype racket set autoindent
endif
set lispwords+=public-method,override-method,private-method,syntax-case,syntax-rules
set lispwords+=..more..
set foldenable " 开始折叠
set foldmethod=syntax " 设置语法折叠
set foldcolumn=0 " 设置折叠区域的宽度
setlocal foldlevel=1 " 设置折叠层数为
set foldlevelstart=99 " 打开文件是默认不折叠代码
set colorcolumn=0
set backspace=2
" haskell
let g:haddock_browser="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
let maplocalleader = "\\"
" remove trailing spaces
autocmd BufWritePre * :%s/\s\+$//e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment