Skip to content

Commit

Permalink
增加快速注释插件
Browse files Browse the repository at this point in the history
  • Loading branch information
ma6174 committed Oct 2, 2013
1 parent b179571 commit fe0e188
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 16 deletions.
40 changes: 31 additions & 9 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ au FileType c setlocal dict+=~/.vim/dict/c.dict
au FileType cpp setlocal dict+=~/.vim/dict/cpp.dict
au FileType scale setlocal dict+=~/.vim/dict/scale.dict
au FileType javascript setlocal dict+=~/.vim/dict/javascript.dict
au FileType html setlocal dict+=~/.vim/dict/javascript.dict
au FileType html setlocal dict+=~/.vim/dict/css.dict

"
"syntastic相关
Expand Down Expand Up @@ -62,7 +64,7 @@ set tabstop=4
set softtabstop=4
set shiftwidth=4
" 不要用空格代替制表符
set noexpandtab
set expandtab
" 在行和段开始处使用制表符
set smarttab
" 显示行号
Expand Down Expand Up @@ -96,6 +98,8 @@ au BufRead,BufNewFile *.{js} set filetype=javascript
"rkdown to HTML
nmap md :!~/.vim/markdown.pl % > %.html <CR><CR>
nmap fi :!firefox %.html & <CR><CR>
nmap \ \cc
vmap \ \cc
"将tab替换为空格
nmap tt :%s/\t/ /g<CR>
Expand Down Expand Up @@ -169,6 +173,8 @@ set mouse=v
nnoremap <F2> :g/^\s*$/d<CR>
"比较文件
nnoremap <C-F2> :vert diffsplit
"nnoremap <Leader>fu :CtrlPFunky<Cr>
"nnoremap <C-n> :CtrlPFunky<Cr>
"列出当前目录文件
map <F3> :NERDTree<CR>
"打开树状文件目录
Expand Down Expand Up @@ -264,13 +270,13 @@ autocmd FileType c,cpp map <buffer> <leader><space> :w<cr>:make<cr>
"代码补全
set completeopt=preview,menu
"允许插件
filetype plugin on
"filetype plugin on
"共享剪贴板
"set clipboard+=unnamed
"自动保存
set autowrite
set ruler " 打开状态栏标尺
set cursorline " 突出显示当前行
"set ruler " 打开状态栏标尺
"set cursorline " 突出显示当前行
set magic " 设置魔术
set guioptions-=T " 隐藏工具栏
set guioptions-=m " 隐藏菜单栏
Expand Down Expand Up @@ -398,12 +404,9 @@ let g:miniBufExplModSelTarget = 1


set iskeyword+=.
set fileencodings=utf-8
set termencoding=utf-8
set encoding=utf8
set fileencoding=utf8
set fileencodings=utf8,ucs-bom,gbk,cp936,gb2312,gb18030
let &termencoding=&encoding

autocmd FileType python set omnifunc=pythoncomplete#Complete

Expand Down Expand Up @@ -439,12 +442,19 @@ Bundle 'synmark.vim'
"Bundle 'Python-mode-klen'
Bundle 'SQLComplete.vim'
Bundle 'Javascript-OmniCompletion-with-YUI-and-j'
Bundle 'JavaScript-Indent'
Bundle 'Better-Javascript-Indentation'
"Bundle 'JavaScript-Indent'
"Bundle 'Better-Javascript-Indentation'
Bundle 'jslint.vim'
Bundle "pangloss/vim-javascript"
Bundle 'Vim-Script-Updater'
Bundle 'ctrlp.vim'
Bundle 'tacahiroy/ctrlp-funky'
Bundle 'jsbeautify'
Bundle 'The-NERD-Commenter'
"django
Bundle 'django_templates.vim'
Bundle 'Django-Projects'

"Bundle 'FredKSchott/CoVim'
"Bundle 'djangojump'
" ...
Expand All @@ -462,3 +472,15 @@ filetype plugin indent on " required!
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
"
"
"ctrlp设置
"
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*.png,*.jpg,*.gif " MacOSX/Linux
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe,*.pyc,*.png,*.jpg,*.gif " Windows

let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
let g:ctrlp_custom_ignore = '\v\.(exe|so|dll)$'
let g:ctrlp_extensions = ['funky']

let NERDTreeIgnore=['\.pyc']
1 change: 1 addition & 0 deletions bundle/Django-Projects
Submodule Django-Projects added at ae139c
1 change: 1 addition & 0 deletions bundle/The-NERD-Commenter
Submodule The-NERD-Commenter added at 49ad45
1 change: 1 addition & 0 deletions bundle/ctrlp-funky
Submodule ctrlp-funky added at c4c0ca
1 change: 1 addition & 0 deletions bundle/ctrlp.vim
Submodule ctrlp.vim added at bd07a7
1 change: 1 addition & 0 deletions bundle/django_templates.vim
Submodule django_templates.vim added at 3c9ff0
44 changes: 38 additions & 6 deletions dict/cpp.dict
Original file line number Diff line number Diff line change
@@ -1,13 +1,46 @@

<!-- saved from url=(0071)https://raw.github.com/tyru/dotfiles/master/dotfiles/.vim/dict/cpp.dict -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style>@-moz-keyframes nodeInserted{from{opacity:0.99;}to{opacity:1;}}@-webkit-keyframes nodeInserted{from{opacity:0.99;}to{opacity:1;}}@-o-keyframes nodeInserted{from{opacity:0.99;}to{opacity:1;}}@keyframes nodeInserted{from{opacity:0.99;}to{opacity:1;}}embed,object{animation-duration:.001s;-ms-animation-duration:.001s;-moz-animation-duration:.001s;-webkit-animation-duration:.001s;-o-animation-duration:.001s;animation-name:nodeInserted;-ms-animation-name:nodeInserted;-moz-animation-name:nodeInserted;-webkit-animation-name:nodeInserted;-o-animation-name:nodeInserted;}</style><style type="text/css"></style><script></script><script id="hp_same_"></script><script id="hp_done_"></script></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">input_iterator_tag
auto
bool
break
case
char
const
continue
default
do
double
else
enum
extern
float
for
if
inline
int
long
register
restrict
return
short
signed
size_t
sizeof
static
struct
switch
typedef
union
unsigned
void
volatile
wchar_t
while
main
input_iterator_tag
output_iterator_tag
forward_iterator_tag
bidirectional_iterator_tag
random_access_iterator_tag

iterator_traits

advance
algorithm
allocator
Expand Down Expand Up @@ -215,4 +248,3 @@ width
write
xor
xor_eq
</pre></body></html>
1 change: 0 additions & 1 deletion dict/javascript.dict
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ DOMMouseScroll
Date
Error
EvalError
Function
Image
Infinity
LN10
Expand Down
Binary file removed plugin/libvimim.dll
Binary file not shown.
3 changes: 3 additions & 0 deletions tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@
- 当然也可以使用万能的`F5`键来一键转换并打开预览
- 如果打开过程中屏幕出现一些混乱信息,可以按`Ctrl + l`来恢复

### 快速注释

-` \ ` 可以根据文件类型自动注释

0 comments on commit fe0e188

Please sign in to comment.