Skip to content

Instantly share code, notes, and snippets.

@bitdust
Last active July 21, 2018 13:31

Revisions

  1. bitdust revised this gist Jul 21, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vimrc
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    默认选项
    " 默认选项
    set fileencodings=utf8,cp936,gb18030,big5
    syntax enable
    syntax on
  2. bitdust revised this gist Apr 29, 2015. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@ set number " 显示行号
    set nocompatible " 与vi不兼容
    set showmatch " 匹配括号


    " tab相关
    set tabstop=4
    set smarttab
    @@ -15,10 +16,12 @@ set cindent
    set autoindent
    filetype plugin indent on


    " 配色
    set t_Co=256
    colorscheme desert


    " 搜索
    set hlsearch " highlight matches
    set incsearch " incremental searching
    @@ -38,13 +41,13 @@ au BufWinEnter ?* silent loadview
    " zo 打开折叠
    " zf 创建折叠
    " zd 删除折叠
    " zM 打开所有
    " zR 关闭所有
    " zM 关闭所有


    " 参考资料
    " http://coolshell.cn/articles/11312.html 无插件Vim编程技巧
    " http://mislav.uniqpath.com/2011/12/vim-revisited/ Vim: revisited


    " 备注
    " 插入模式中,ctrl+n可以自动补全
    " 插入模式中,ctrl+n可以自动补全
  3. bitdust revised this gist Apr 29, 2015. 1 changed file with 14 additions and 4 deletions.
    18 changes: 14 additions & 4 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    " 默认选项
    默认选项
    set fileencodings=utf8,cp936,gb18030,big5
    syntax enable
    syntax on
    @@ -25,16 +25,26 @@ set incsearch " incremental searching
    " set ignorecase " searches are case insensitive...
    set smartcase " ... unless they contain at least one capital letter


    " 代码折叠
    set foldmethod=manual "默认使用手动折叠
    " set foldmethod=indent "缩进折叠
    " set foldmethod=syntax "语法折叠
    " 保存代码折叠信息
    au BufWinLeave,BufLeave,WinLeave ?* mkview
    au BufWinEnter ?* silent loadview
    " 参考 http://vim.wikia.com/wiki/Make_views_automatic
    " 代码折叠快捷键为 zf zo

    " zc 关闭折叠
    " zo 打开折叠
    " zf 创建折叠
    " zd 删除折叠
    " zM 打开所有
    " zR 关闭所有

    " 参考资料
    " http://coolshell.cn/articles/11312.html 无插件Vim编程技巧
    " http://mislav.uniqpath.com/2011/12/vim-revisited/ Vim: revisited


    " 备注
    " 插入模式中,ctrl+n可以自动补全
    " 插入模式中,ctrl+n可以自动补全
  4. bitdust revised this gist Apr 29, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -26,8 +26,8 @@ set incsearch " incremental searching
    set smartcase " ... unless they contain at least one capital letter

    " 保存代码折叠信息
    au BufWritePost,BufLeave,WinLeave ?* mkview
    au BufReadPre ?* silent loadview
    au BufWinLeave,BufLeave,WinLeave ?* mkview
    au BufWinEnter ?* silent loadview
    " 参考 http://vim.wikia.com/wiki/Make_views_automatic
    " 代码折叠快捷键为 zf zo

  5. bitdust revised this gist Apr 29, 2015. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -26,10 +26,12 @@ set incsearch " incremental searching
    set smartcase " ... unless they contain at least one capital letter

    " 保存代码折叠信息
    au BufWinLeave *.* silent mkview
    au BufWinEnter *.* silent loadview
    au BufWritePost,BufLeave,WinLeave ?* mkview
    au BufReadPre ?* silent loadview
    " 参考 http://vim.wikia.com/wiki/Make_views_automatic
    " 代码折叠快捷键为 zf zo


    " 参考资料
    " http://coolshell.cn/articles/11312.html 无插件Vim编程技巧
    " http://mislav.uniqpath.com/2011/12/vim-revisited/ Vim: revisited
  6. bitdust revised this gist Apr 29, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -26,8 +26,8 @@ set incsearch " incremental searching
    set smartcase " ... unless they contain at least one capital letter

    " 保存代码折叠信息
    au BufWinLeave * silent mkview
    au BufWinEnter * silent loadview
    au BufWinLeave *.* silent mkview
    au BufWinEnter *.* silent loadview
    " 代码折叠快捷键为 zf zo

    " 参考资料
  7. bitdust revised this gist Apr 29, 2015. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,11 @@ set incsearch " incremental searching
    " set ignorecase " searches are case insensitive...
    set smartcase " ... unless they contain at least one capital letter

    " 保存代码折叠信息
    au BufWinLeave * silent mkview
    au BufWinEnter * silent loadview
    " 代码折叠快捷键为 zf zo

    " 参考资料
    " http://coolshell.cn/articles/11312.html 无插件Vim编程技巧
    " http://mislav.uniqpath.com/2011/12/vim-revisited/ Vim: revisited
  8. bitdust revised this gist Apr 29, 2015. 1 changed file with 15 additions and 9 deletions.
    24 changes: 15 additions & 9 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -1,27 +1,33 @@
    " 默认选项
    set fileencodings=utf8,cp936,gb18030,big5
    syntax enable
    syntax on
    set number " 显示行号
    set nocompatible " 与vi不兼容
    set showmatch " 匹配括号

    " tab相关
    set tabstop=4
    set smarttab
    set shiftwidth=4
    set expandtab
    set cindent
    set autoindent
    " 显示行号
    set number
    " 与vi不兼容
    set nocompatible
    " 匹配括号
    set showmatch

    filetype plugin indent on

    " 配色
    set t_Co=256
    colorscheme desert

    " 搜索相关
    " 搜索
    set hlsearch " highlight matches
    set incsearch " incremental searching
    " set ignorecase " searches are case insensitive...
    set smartcase " ... unless they contain at least one capital letter
    set smartcase " ... unless they contain at least one capital letter

    " 参考资料
    " http://coolshell.cn/articles/11312.html 无插件Vim编程技巧
    " http://mislav.uniqpath.com/2011/12/vim-revisited/ Vim: revisited

    " 备注
    " 插入模式中,ctrl+n可以自动补全
  9. bitdust revised this gist Apr 29, 2015. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -9,8 +9,6 @@ set cindent
    set autoindent
    " 显示行号
    set number
    " 快速搜索
    set incsearch
    " 与vi不兼容
    set nocompatible
    " 匹配括号
    @@ -20,4 +18,10 @@ filetype plugin indent on

    " 配色
    set t_Co=256
    colorscheme desert
    colorscheme desert

    " 搜索相关
    set hlsearch " highlight matches
    set incsearch " incremental searching
    " set ignorecase " searches are case insensitive...
    set smartcase " ... unless they contain at least one capital letter
  10. bitdust revised this gist Apr 29, 2015. 1 changed file with 14 additions and 1 deletion.
    15 changes: 14 additions & 1 deletion vimrc
    Original file line number Diff line number Diff line change
    @@ -7,4 +7,17 @@ set shiftwidth=4
    set expandtab
    set cindent
    set autoindent
    filetype plugin indent on
    " 显示行号
    set number
    " 快速搜索
    set incsearch
    " 与vi不兼容
    set nocompatible
    " 匹配括号
    set showmatch

    filetype plugin indent on

    " 配色
    set t_Co=256
    colorscheme desert
  11. bitdust created this gist Apr 29, 2015.
    10 changes: 10 additions & 0 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    set fileencodings=utf8,cp936,gb18030,big5
    syntax enable
    syntax on
    set tabstop=4
    set smarttab
    set shiftwidth=4
    set expandtab
    set cindent
    set autoindent
    filetype plugin indent on