`
天梯梦
  • 浏览: 13763875 次
  • 性别: Icon_minigender_2
  • 来自: 洛杉矶
社区版块
存档分类
最新评论
阅读更多

/etc/vim/vimrc

set nocompatible    " use vim defaults
set backspace=2    "make backspace like most other apps
set ls=2            " allways show status line
set tabstop=5       " numbers of spaces of tab character
set shiftwidth=5    " numbers of spaces to (auto)indent
set scrolloff=5     " keep 3 lines when scrolling
set showcmd         " display incomplete commands
set hlsearch        " highlight searches
set incsearch       " do incremental searching
set ruler           " show the cursor position all the time
set visualbell t_vb=    " turn off error beep/flash
set novisualbell    " turn off visual bell
set nobackup        " do not keep a backup file
set number          " show line numbers
set ignorecase      " ignore case when searching
"set noignorecase   " don't ignore case
set title           " show title in console title bar
set ttyfast         " smoother changes
"set ttyscroll=0        " turn off scrolling, didn't work well with PuTTY
set modeline        " last lines in document sets vim mode
set modelines=3     " number lines checked for modelines
set shortmess=atI   " Abbreviate messages
set nostartofline   " don't jump to first character when paging
set whichwrap=b,s,h,l,<,>,[,]   " move freely between files
"set viminfo='20,<50,s10,h
set mouse=a

set fileencodings=utf-8,gb2312,gbk,gb18030
set termencoding=utf-8
set encoding=prc

colorscheme desert

set autoindent     " always set autoindenting on
set smartindent        " smart indent
set cindent            " cindent
"set noautoindent
"set nosmartindent
"set nocindent  

"set autowrite      " auto saves changes when quitting and swiching buffer
"set expandtab      " tabs are converted to spaces, use only when required
"set sm             " show matching braces, somewhat annoying...
"set nowrap         " don't wrap lines

highlight Normal guibg=grey90
highlight Cursor guibg=Green guifg=NONE
highlight NonText guibg=grey80
highlight Constant gui=NONE guibg=grey95
highlight Special gui=NONE guibg=grey95

" Color settings for the cursor (different colors for insert mode)
" Modified for black
"highlight Cursor   guifg=white  guibg=black
"highlight Cursor   guifg=red  guibg=lightgreen
highlight Cursor   guifg=white  guibg=black
highlight iCursor  guifg=white  guibg=black

" Cursor shape (insert => vertical line)
set guicursor=n-v-c:block-Cursor
"set guicursor+=i:ver30-iCursor

" Gui background color
"	 highlight Normal guibg=lightblue
"	highlight Normal guibg=lightyellow
"	highlight Normal guibg=#fffddd
"	highlight Normal guibg=#99cccc
"	 highlight Normal guibg=lightmagenta
"	 highlight Normal guibg=lightgreen
" Modified for black
	highlight Normal guibg=#eeeeee
	highlight Normal guibg=white guifg=darkblue
	highlight Normal guibg=black guifg=white

   highlight Visual guibg=black 
"   highlight Visual guibg=lightmagenta

:highlight Normal ctermfg=grey ctermbg=black

syntax on           " syntax highlighing
if has("gui_running")
    " See ~/.gvimrc
    set guifont=Monospace\ 10  " use this font
    set lines=50       " height = 50 lines
    set columns=100        " width = 100 columns
    set background=light   " adapt colors for background
    set selectmode=mouse,key,cmd
"    set keymodel=
else
"    colorscheme elflord    " use this color scheme
    set background=dark        " adapt colors for background
endif

if has("autocmd")
    " Restore cursor position
    au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif

    " Filetypes (au = autocmd)
    au FileType helpfile set nonumber      " no line numbers when viewing help
    au FileType helpfile nnoremap <buffer><cr> <c-]>   " Enter selects subject
    au FileType helpfile nnoremap <buffer><bs> <c-T>   " Backspace to go back
    
    " When using mutt, text width=72
    au FileType mail,tex set textwidth=72
    au FileType cpp,c,java,sh,pl,php,asp  set autoindent
    au FileType cpp,c,java,sh,pl,php,asp  set smartindent
    au FileType cpp,c,java,sh,pl,php,asp  set cindent
    "au BufRead mutt*[0-9] set tw=72
    
    " Automatically chmod +x Shell and Perl scripts
    "au BufWritePost   *.sh             !chmod +x %
    "au BufWritePost   *.pl             !chmod +x %

    " File formats
    au BufNewFile,BufRead  *.pls    set syntax=dosini
    au BufNewFile,BufRead  modprobe.conf    set syntax=modconf
endif
 

others

 

" use extended function of vim (no compatible with vi)

set nocompatible

" specify encoding

set encoding=euc-jp

" specify file encoding

set fileencodings=iso-2022-jp,sjis

" specify file formats

set fileformats=unix,dos

" take backup

" if not, specify [ set nobackup ]

set backup

" specify backup directory

set backupdir=~/backup

" take 50 search histories

set history=50

" ignore Case

set ignorecase

" distinct Capital if you mix it in search words

set smartcase

" highlights matched words

" if not, specify [ set nohlsearch ]

set hlsearch

" use incremental search

" if not, specify [ set noincsearch ]

set incsearch

" show line number

" if not, specify [ set nonumber ]

set number

" Visualize break ( $ ) or tab ( ^I )

set list

" highlights parentheses

set showmatch

" show color display

" if not, specify [ syntax off ]

syntax on

" change colors for comments if it's set [ syntax on ]

highlight Comment ctermfg=LightCyan

" wrap lines

" if not, specify [ set nowrap ]

set wrap
 

 

 

 

 

 

 

分享到:
评论

相关推荐

    vimsettings:我的 vim 设置和插件

    :改善 vim 对 js 的高亮和语法支持。 :直接拷贝的,并修改、添加了对 self 的支持。 :语法检查。 :检查python代码是否符合 pep8规范。 :插件管理。 : indent improved : zen coding in vim, a tutorial is here ...

    vim:myvimrepo

    vim myvimrepo(old vim setting)相关设定说明$\vim\vimrc Your personal vimrc. $\vim\viminfo Dynamic info for 'viminfo'. 记录你编辑过的档案$\vim\vimfiles\ftplugin*.vim 'Filetype plugins 你要加入的套件' $\...

    Linux vim schemacolor settings

    【标题】"Linux vim schemacolor settings" 涉及的知识点主要集中在Linux操作系统中的文本编辑器vim(Vi Improved)的使用以及颜色方案(schemacolor)的配置上。vim是一个强大的、高度可定制的命令行文本编辑器,被...

    VIM_setting

    这是我自己一直使用VIM 的一些设置, 仅供参考

    Learn Vimscript the Hard Way

    3. 设置选项(Setting Options):Vim有很多配置选项,可以设置布尔值选项、检查选项值,以及对带值的选项进行配置。 4. 映射(Mappings):在Vim中使用映射可以将一系列按键操作绑定到一个命令上。书中介绍了基础...

    vim数据库插件dbext_420

    7. Setting up connection information |dbext-connect| 7.1 Connection Parameters |dbext-connect-parameters| 7.2 Prompting for Parameters |dbext-connect-prompting| 7.3 Connection profiles |dbext-...

    gvim setting

    ### gvim setting:vim在Windows环境下的配置 #### 概述 `gvim`是`vim`的一个图形界面版本,在Windows环境下使用时,通常需要进行一些特定的设置以优化其性能与用户体验。本文将深入探讨如何针对Windows环境进行`...

    vim-lsp-settings:用于vim-lsp的语言服务器的自动配置

    **vim-lsp-settings** 是一个专门为 **vim-lsp** 插件设计的自动化配置工具,旨在简化在 Vim 编辑器中集成语言服务器的过程。语言服务器协议(Language Server Protocol,LSP)是一种标准,允许编辑器与后端服务通信...

    vim-monokai:Monokai 主题

    Vim是一款强大的文本编辑器,深受程序员和代码爱好者喜爱。Monokai主题是源自Textmate的一款流行的颜色方案,以其暗色背景和高对比度的色彩搭配,为代码提供了清晰的可读性。在Vim中引入Monokai主题,可以极大地提升...

    vim 配置文件 vimrc

    在实际使用中,遇到不明白的`vimrc`设置,可以通过`:help &lt;setting&gt;`在Vim内置的帮助系统中查找相关文档,了解其作用和用法。Vim的学习曲线虽然陡峭,但一旦掌握,将极大地提升你的文本编辑效率。

    vim插件和配置 for Linux 自动补全 IDE

    " --fold setting --- set foldmethod=syntax "用语法高亮来定义折叠 set foldlevel=100 "启动vim时不要自动折叠代码 set foldcolumn=5 "设置折叠栏宽度 常用命令: za 打开/关闭在光标下的折叠 zA 循环地打开/关闭...

    vim-setting-in-one-minute:只需下载这些文件即可为Vim设置出色的功能,然后就可以将Vim用作IDE

    设置: 在您的主目录中添加文件夹“ vim”,文件夹“ tags”,文件“ vimrc”,文件“ ycm_extra_conf.py”(cd〜) 将名称“ vim”,“标签”,“ vimrc”,“ ycm_extra_conf.py”修改为“ .vim”,“标签”,....

    Sublime-Like-Vim:这个存储库使 Vim 颜色方案与基于 monokai 颜色方案的 Sublime Text 相似

    Sublime-Like-Vim 这个存储库使 Sublime-Text-like-Vim 环境...下载此存储库并执行 vim-setting.py。 如果它返回“Completed Sublime-Like-Vim 安装没有错误”。 留言,都搞定了。 您可以在安装后删除下载的文件。

    im-select.exe

    - 在 vscode-vim 插件的 setting.json 中设置 ``` "vim.useSystemClipboard": true, "vim.autoSwitchInputMethod.enable": true, "vim.autoSwitchInputMethod.defaultIM": "1033", "vim....

    serverspec-snippets:Serverspec 的 vim 片段

    服务器规范片段 这是vim 片段。 从上 。 要求 安装 文德尔 设置包管理器 为设置包 ... " setting example let g: neosnippet #snippets_directory = [ \' ~/.vim/snippets', \' ~/.vim/bundle/

    vimplugin-cli:用于管理vim插件的CLI

    vimplugin-cli 用于管理vim插件的CLI 支持: 用法: Usage: vimplugin [options] [command] Options: -V, --version output the version number ... customize [plugin] Open/Edit a plugin setting help [cmd

    devsetting:Linux环境中的开发设置

    总之,`devsetting`项目是Linux开发环境中个人化设置的一个实例,通过`Vimscript`定制Vim编辑器,结合其他工具和脚本,创建了一个高效、舒适的工作环境。对于任何希望在Linux上进行高效开发的人来说,理解和掌握这些...

    IDE-vimrc-setting.vimrc

    vim有编辑器之神的称谓,本资源就是设置脚本,插件安装管理

    BoxSetting:我的编辑器设置-Vim,Tmux和ITERM:confetti_ball::party_popper:

    【BoxSetting:我的编辑器设置-Vim,Tmux和ITERM】 在IT行业中,高效的工作环境是提升生产力的关键。编辑器、终端管理器和shell的个性化配置能够大大提高程序员的工作效率。本篇将深入探讨Vim、Tmux以及iTerm这三个...

Global site tag (gtag.js) - Google Analytics