`
IvanLi
  • 浏览: 604544 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

my vimrc

阅读更多
copy from http://www.vi-improved.org/vimrc.php
" Modeline and Notes {
 " vim: set foldmarker={,} foldlevel=0 spell:
 "
 " This is my personal .vimrc, I don't recommend you copy it, just
 " use the " pieces you want(and understand!). When you copy a
 " .vimrc in its entirety, weird and unexpected things can happen.
 "
 " If you find an obvious mistake hit me up at:
 " http://robertmelton.com/contact (many forms of communication)
 " }

 " Basics {
 set nocompatible " explicitly get out of vi-compatible mode
 set noexrc " don't use local version of .(g)vimrc, .exrc
 set background=dark " we plan to use a dark background
 set cpoptions=aABceFsmq
 " |||||||||
 " ||||||||+-- When joining lines, leave the cursor
 " ||||||| between joined lines
 " |||||||+-- When a new match is created (showmatch)
 " |||||| pause for .5
 " ||||||+-- Set buffer options when entering the
 " ||||| buffer
 " |||||+-- :write command updates current file name
 " ||||+-- Automatically add <CR> to the last line
 " ||| when using :@r
 " |||+-- Searching continues at the end of the match
 " || at the cursor position
 " ||+-- A backslash has no special meaning in mappings
 " |+-- :write updates alternative file name
 " +-- :read updates alternative file name
 syntax on " syntax highlighting on
 " }

 " General {
 filetype plugin indent on " load filetype plugins/indent settings
 set backspace=indent,eol,start " make backspace a more flexible
 set backup " make backup files
 set backupdir=~/.vim/backup " where to put backup files
 set clipboard+=unnamed " share windows clipboard
 set directory=~/.vim/tmp " directory to place swap files in
 set fileformats=unix,dos,mac " support all three, in this order
 set hidden " you can change buffers without saving
 " (XXX: #VIM/tpope warns the line below could break things)
 set iskeyword+=_,$,@,%,# " none of these are word dividers
 set mouse=a " use mouse everywhere
 set noerrorbells " don't make noise
 set whichwrap=b,s,h,l,<,>,~,[,] " everything wraps
 " | | | | | | | | |
 " | | | | | | | | +-- "]" Insert and Replace
 " | | | | | | | +-- "[" Insert and Replace
 " | | | | | | +-- "~" Normal
 " | | | | | +-- <Right> Normal and Visual
 " | | | | +-- <Left> Normal and Visual
 " | | | +-- "l" Normal and Visual (not recommended)
 " | | +-- "h" Normal and Visual (not recommended)
 " | +-- <Space> Normal and Visual
 " +-- <BS> Normal and Visual
 set wildmenu " turn on command line completion wild style
 " ignore these list file extensions
 set wildignore=*.dll,*.o,*.obj,*.bak,*.exe,*.pyc,
 \*.jpg,*.gif,*.png
 set wildmode=list:longest " turn on wild mode huge list
 " }

 " Vim UI {
 set cursorcolumn " highlight the current column
 set cursorline " highlight current line
 set incsearch " BUT do highlight as you type you
 " search phrase
 set laststatus=2 " always show the status line
 set lazyredraw " do not redraw while running macros
 set linespace=0 " don't insert any extra pixel lines
 " betweens rows
 set list " we do what to show tabs, to ensure we get them
 " out of my files
 set listchars=tab:>-,trail:- " show tabs and trailing
 set matchtime=5 " how many tenths of a second to blink
 " matching brackets for
 set nohlsearch " do not highlight searched for phrases
 set nostartofline " leave my cursor where it was
 set novisualbell " don't blink
 set number " turn on line numbers
 set numberwidth=5 " We are good up to 99999 lines
 set report=0 " tell us when anything is changed via :...
 set ruler " Always show current positions along the bottom
 set scrolloff=10 " Keep 10 lines (top/bottom) for scope
 set shortmess=aOstT " shortens messages to avoid
 " 'press a key' prompt
 set showcmd " show the command being typed
 set showmatch " show matching brackets
 set sidescrolloff=10 " Keep 5 lines at the size
 set statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v]
 " | | | | | | | | | | |
 " | | | | | | | | | | + current
 " | | | | | | | | | | column
 " | | | | | | | | | +-- current line
 " | | | | | | | | +-- current % into file
 " | | | | | | | +-- current syntax in
 " | | | | | | | square brackets
 " | | | | | | +-- current fileformat
 " | | | | | +-- number of lines
 " | | | | +-- preview flag in square brackets
 " | | | +-- help flag in square brackets
 " | | +-- readonly flag in square brackets
 " | +-- rodified flag in square brackets
 " +-- full path to file in the buffer
 " }

 " Text Formatting/Layout {
 set completeopt= " don't use a pop up menu for completions
 set expandtab " no real tabs please!
 set formatoptions=rq " Automatically insert comment leader on return,
 " and let gq format comments
 set ignorecase " case insensitive by default
 set infercase " case inferred by default
 set nowrap " do not wrap line
 set shiftround " when at 3 spaces, and I hit > ... go to 4, not 5
 set smartcase " if there are caps, go case-sensitive
 set shiftwidth=4 " auto-indent amount when using cindent,
 " >>, << and stuff like that
 set softtabstop=4 " when hitting tab or backspace, how many spaces
 "should a tab be (see expandtab)
 set tabstop=8 " real tabs should be 8, and they will show with
 " set list on
 " }

 " Folding {
 set foldenable " Turn on folding
 set foldmarker={,} " Fold C style code (only use this as default
 " if you use a high foldlevel)
 set foldmethod=marker " Fold on the marker
 set foldlevel=100 " Don't autofold anything (but I can still
 " fold manually)
 set foldopen=block,hor,mark,percent,quickfix,tag " what movements
 " open folds
 function SimpleFoldText() " {
 return getline(v:foldstart).' '
 endfunction " }
 set foldtext=SimpleFoldText() " Custom fold text function
 " (cleaner than default)
 " }

 " Plugin Settings {
 let b:match_ignorecase = 1 " case is stupid
 let perl_extended_vars=1 " highlight advanced perl vars
 " inside strings

 " TagList Settings {
 let Tlist_Auto_Open=0 " let the tag list open automagically
 let Tlist_Compact_Format = 1 " show small menu
 let Tlist_Ctags_Cmd = 'ctags' " location of ctags
 let Tlist_Enable_Fold_Column = 0 " do show folding tree
 let Tlist_Exist_OnlyWindow = 1 " if you are the last, kill
 " yourself
 let Tlist_File_Fold_Auto_Close = 0 " fold closed other trees
 let Tlist_Sort_Type = "name" " order by
 let Tlist_Use_Right_Window = 1 " split to the right side
 " of the screen
 let Tlist_WinWidth = 40 " 40 cols wide, so i can (almost always)
 " read my functions
 " Language Specifics {
 " just functions and classes please
 let tlist_aspjscript_settings = 'asp;f:function;c:class'
 " just functions and subs please
 let tlist_aspvbs_settings = 'asp;f:function;s:sub'
 " don't show variables in freaking php
 let tlist_php_settings = 'php;c:class;d:constant;f:function'
 " just functions and classes please
 let tlist_vb_settings = 'asp;f:function;c:class'
 " }
 " }
 " }

 " Mappings {
 " ROT13 - fun
 map <F12> ggVGg?

 " space / shift-space scroll in normal mode
 noremap <S-space> <C-b>
 noremap <space> <C-f>

 " Make Arrow Keys Useful Again {
 map <down> <ESC>:bn<RETURN>
 map <left> <ESC>:NERDTreeToggle<RETURN>
 map <right> <ESC>:Tlist<RETURN>
 map <up> <ESC>:bp<RETURN>
 " }
 " }

 " Autocommands {
 " Ruby {
 " ruby standard 2 spaces, always
 au BufRead,BufNewFile *.rb,*.rhtml set shiftwidth=2
 au BufRead,BufNewFile *.rb,*.rhtml set softtabstop=2
 " }
 " Notes {
 " I consider .notes files special, and handle them differently, I
 " should probably put this in another file
 au BufRead,BufNewFile *.notes set foldlevel=2
 au BufRead,BufNewFile *.notes set foldmethod=indent
 au BufRead,BufNewFile *.notes set foldtext=foldtext()
 au BufRead,BufNewFile *.notes set listchars=tab:\ \
 au BufRead,BufNewFile *.notes set noexpandtab
 au BufRead,BufNewFile *.notes set shiftwidth=8
 au BufRead,BufNewFile *.notes set softtabstop=8
 au BufRead,BufNewFile *.notes set tabstop=8
 au BufRead,BufNewFile *.notes set syntax=notes
 au BufRead,BufNewFile *.notes set nocursorcolumn
 au BufRead,BufNewFile *.notes set nocursorline
 au BufRead,BufNewFile *.notes set guifont=Consolas:h12
 au BufRead,BufNewFile *.notes set spell
 " }
 au BufNewFile,BufRead *.ahk setf ahk
 " }

 " GUI Settings {
 if has("gui_running")
 " Basics {
 colorscheme metacosm " my color scheme (only works in GUI)
 set columns=180 " perfect size for me
 set guifont=Consolas:h10 " My favorite font
 set guioptions=ce
 " ||
 " |+-- use simple dialogs rather than pop-ups
 " + use GUI tabs, not console style tabs
 set lines=55 " perfect size for me
 set mousehide " hide the mouse cursor when typing
 " }

 " Font Switching Binds {
 map <F8> <ESC>:set guifont=Consolas:h8<CR>
 map <F9> <ESC>:set guifont=Consolas:h10<CR>
 map <F10> <ESC>:set guifont=Consolas:h12<CR>
 map <F11> <ESC>:set guifont=Consolas:h16<CR>
 map <F12> <ESC>:set guifont=Consolas:h20<CR>
 " }
 endif
 " }
分享到:
评论

相关推荐

    My .vimrc Backup

    《我的.vimrc备份:构建个性化的Vim编辑器环境》 在程序员的世界里,Vim编辑器以其高效、强大的特性赢得了众多忠实拥趸。一个精心配置的.vimrc文件,就像是程序员的个性化工作站,能够极大地提升编码效率。这篇博客...

    my-vimrc-master.zip

    "my-vimrc-master.zip" 是一个包含个人Vim配置文件的压缩包,特别为Vim 8.2版本优化。Vim配置文件(通常称为.vimrc)是用于设置编辑器行为的脚本,它允许用户根据个人喜好调整各种功能,如快捷键、颜色方案、插件等...

    my_vimrc:个人vim的配置文件

    用于备份我的.vimrc文件,防止丢失重新配置

    jonsen-vimrc

    my vimrc for vim 7.2 VIM(1) VIM(1) NAME vim - Vi IMproved, a programmers text editor SYNOPSIS vim [options] [file ..] vim [options] - vim [options] -t tag vim [options] -q [errorfile] ex ...

    vimrc settings

    vim settings,please rename vimrc to ".vimrc",and then move it to user directory. E.g /root/.vimrc /home/my/.vimrc It's very useful for me.

    我正在使用的_vimrc文件、字体和配色方案

    在提供的`myvim`压缩包中,很可能包含了用户的`.vimrc`文件、特定的字体文件以及配色方案文件。解压并应用这些设置,可以帮助用户快速搭建一个与原作者相似的工作环境。需要注意的是,个人化的配置可能需要根据自己...

    vim 配置文件 vimrc 较适用于php开发

    " My Bundles here: " " original repos on github Bundle 'mattn/zencoding-vim' Bundle 'Lokaltog/vim-powerline' Bundle 'Shougo/neocomplcache' Bundle 'Shougo/vimproc' "Bundle 'Shougo/neosnippet' ...

    my_vimrc_config:简单的vimrc配置,用于C ++中的竞争性编程

    【标题】"my_vimrc_config" 是一个针对C++竞争性编程的Vim配置文件集,它旨在优化Vim编辑器的环境,提供高效、美观且实用的编程体验。这个配置通过Vundle管理插件,确保了美学与实用性的完美结合。 【描述】中提到...

    my_vim:我的vimrc

    【标题】"my_vim:我的vimrc"指的是个人自定义的Vim配置文件集合,通常包含了一系列的Vim插件、设置和快捷键,以优化编辑器的使用体验。这个压缩包可能是一个名为"my_vim-master"的Git仓库克隆版,包含了作者对于Vim...

    my_vim_config:我的.vim文件夹,其中也包括我的vimrc

    在Vim中,个人配置文件是通过.vim目录和vimrc文件来实现的,这允许用户根据自己的需求调整编辑器的行为。标题中的"my_vim_config"就是这样一个自定义的.vim配置文件集合,包含了作者对于Vim的各种个性化设置。 `my_...

    点文件:.vimrc和.zshrc配置,使工作更轻松

    此外,`.zshrc`还可以用于配置Zsh插件,比如Oh My Zsh,这是一个广泛使用的框架,提供了大量预设的插件和主题,可以极大地提升shell的使用体验。 在`.vimrc`和`.zshrc`文件中,你还可以设置个性化元素,如提示符...

    MyVim:vim,vimrc,vimrc模板,vim文档,vim note,vim学习,vimtutor,学习vim,vim实践,vim学习,vim笔记,vim训练营,vim教程,vim入门教程,vim简明教程,vim实操教程, vim入门文档,vimtutor中文版

    在`MyVim-master`这个压缩包中,可能包含了作者黄剑关于Vim的学习资料、笔记、教程和配置示例。这是一份宝贵的资源,可以帮助你深入理解Vim的使用和配置。你可以找到关于Vim的实践案例,学习如何通过Vim提高编码效率...

    my_vim_config

    【描述】:这个压缩包“my_vim_config”包含的是个人化的Vim编辑器配置文件,它反映了用户对于Vim功能和个性化设置的定制,以提高编程效率和舒适度。 【标签】:Vim 【详细知识点】 1. **Vim简介**:Vim(Vi ...

    vimrc of vim

    my vim welcome to download

    积分管理系统java源码-vimrc:vimrc

    My-vimrc 简单说明 for anyone who need this vim 是一个高度可定制化的,文本编辑软件。因此,其个性化配置来说,并不适合所有人。但仍然有一定的借鉴意义。 本vimrc配置文件,是我多年使用vim软件积累所得;主要是...

    my configure file

    my configuration files including vimrc bashrc vim and gvimrc

    config:我的个人配置(zshrc,vimrc等)

    设定档我的个人配置(zshrc,vimrc等)设置安装brew install node 易于curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -sudo apt install -y nodejs : sh -c "$(curl -fsSL ...-depth=1 ...

    my-vimrc-file:因为当我不可避免地打破我的电脑

    Uber API 教程:构建派对邀请为您的下一个聚会制作数字邀请,同时学习如何使用 Uber API。 在本教程结束时,您的邀请将向用户显示最近的优步行程,并链接到您的帐户,以便您可以通过优步 API 附属计划获得奖励。

    myenv:我的环境设置涵盖了.bashrc和.vimrc

    #my包含.bashrc和.vimrc的环境设置 #Linux版本是lubuntu 16.4 #您可以运行“源README.md以运行此脚本” sudo apt更新; sudo apt安装git; #ssh-keygen -t rsa -C“ ” #git config --global user.name“您的...

Global site tag (gtag.js) - Google Analytics