升级python
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar -xvf Python-3.6.5.tgz
cd Python-3.6.5
./configure --enable-shared \
--prefix=/usr/local/python3.6.5
make
make install
修改系统的默认python版本
ln -fs /usr/local/python3.6.5/bin/python3 /usr/bin/python
ln -fs /usr/local/python3.6.5/lib/libpython3.6m.so.1.0 /usr/lib64/libpython3.6m.so.1.0
修改yum配置文件(否则yum无法正常运行)/usr/bin/yum,改为原来系统默认的版本
将第一行的#!/usr/bin/python修改为系统原有的python版本地址#!/usr/bin/python2.6

升级vim
yum -y remove vim
yum install ncurses-devel
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/local/python3.6.5/lib/python3.6/config-3.6m-x86_64-linux-gnu \
--enable-python3interp=yes \
--enable-perlinterp \
--enable-luainterp \
--enable-gui=gtk2 --enable-cscope --prefix=/usr
make
make install

安装vim插件:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

编辑配置文件 ~/.vimrc

set nocompatible "Use Vim settings, rather than Vi settings
"Be IMproved filetype off "required! " I use Vundle https://github.com/gmarik/Vundle.vim as my
" preferred plugin manager.... never got the hang of
" vim-pathogen (no offence to the pathogen community) set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() " Let vundle manage itself
Plugin 'gmarik/Vundle.vim' " Plugins
Plugin 'Valloric/YouCompleteMe'
Plugin 'nvie/vim-flake8'
Plugin 'itchyny/lightline.vim'
Plugin 'altercation/vim-colors-solarized' call vundle#end() " required
filetype plugin indent on "required! set backspace=indent,eol,start "allow backspacing over everything in insert mode set history=50 "keep 50 lines of command line history set ruler "show the cursor position all the time set showcmd "display incomplete commands set incsearch "do incremental searching set nu "show line numbers set expandtab "use spaces instead of tabs set tabstop=4 "insert 4 spaces whenever the tab key is pressed set shiftwidth=4 "set indentation to 4 spaces set hlsearch "highlight search terms set ic "Ignore Case during searches set autoindent "start new line at the same indentation level syntax enable "syntax highlighting set cmdheight=1 "The commandbar height set showmatch "Show matching bracets when text indicator is over them set nobackup " do not keep backup files, it's 70's style cluttering set noswapfile " do not write annoying intermediate swap files,
" who did ever restore from swap files
" anyway?
" https://github.com/nvie/vimrc/blob/master/vimrc#L141 set ttimeoutlen=50 "Solves: there is a pause when leaving insert mode set splitbelow " Horizontal splits open below current file set splitright " Vertical splits open to the right of the current file set wildmode=longest,list " Pressing <Tab> shows command suggestions similar to pressing <Tab>
" in bash set laststatus=2 " Solves lightline not showing " Mappings to traverse buffer list
nnoremap <silent> [b :bprevious<CR>
nnoremap <silent> ]b :bnext<CR>
nnoremap <silent> [B :bfirst<CR>
nnoremap <silent> ]B :blast<CR> "Easy expansion of the active file directory
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%' "Shortcut to Mute Highlighting
nnoremap <silent> <C-l> :<C-u>nohlsearch<CR><C-l> "Root permission on a file inside VIM
cmap w!! w !sudo tee >/dev/null % "To use the Solarized Dark Theme
syntax enable
set background=dark
let g:solarized_termcolors=256
colorscheme darkblue

打开vim安装插件: :PluginInstall

Vim优化的更多相关文章

  1. 高级Linux SA需要会做的事情

    高级Linux SA需要会做的事情:linux---------系统安装(光盘或自动化安装)linux---------系统常用工具安装(sudo,ntp,yum,rsync,lrzsz syssta ...

  2. 关闭linux centos各种声音

    shell报警 #vi /etc/inputrc ================================ set bell-style none 或 echo "set bell- ...

  3. [svc][op]关闭linux centos各种声音

    现在基本都用xshell了,直接xshell禁止即可 shell报警 #vi /etc/inputrc ================================ set bell-style ...

  4. 安装Ubuntu之后的配置

    经常装系统或者给人装系统,这些配置还是记一下,方便恢复到以前的环境 删除libreoffice sudo apt-get remove libreoffice-common 删除Amazon的链接 s ...

  5. CentOS系统初始化---不断更新中

    注意EOF不能有空格tab键 #get os version release=$(rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides ...

  6. vim 配置文件 ,高亮+自动缩进+行号+折叠+优化

    vim 配置文件 ,高亮+自动缩进+行号+折叠+优化 将一下代码copy到 用户目录下 新建文件为  .vimrc保存即可生效: 如果想所有用户生效 请修改 /etc/vimrc (建议先cp一份)& ...

  7. Linux 首先基本包安装(vim啊什么的),源,源优化,项目架构介绍, (LNMuWsgi)Django项目相关软件mysql,redies,python(相关模块)安装配置测试

    内容 补充: 查看已启动服务的端口 netstat -tulnp |grep (方式1) ss -tulnp|grep (方式2) 前期铺垫: . Linux要能上网 . 掌握Linux软件包安装方法 ...

  8. 系统基础优化 vim

    系统基础优化 vim 1系统基础优化 (CPU-lscpu 内存-free 磁盘-df 负载-w/uptime) 1.1 系统基础优化 准备工作:如何查看系统的信息 (1)cat /etc/redha ...

  9. linux vim 配置文件(高亮+自动缩进+行号+折叠+优化)

    点评:将一下代码copy到 用户目录下 新建文件为 .vimrc保存即可生效 如果想所有用户生效 请修改 /etc/vimrc (建议先cp一份)"===================== ...

随机推荐

  1. ecshop后台增加模板页的方法

    CShop的动态模板机制是一个非常灵活的系统,管理员可以在后台根据自己的要求调整模板模块的显示位置.本文详细讲解了如何修改ECSHOP内部结构使得用户可以添加自己的模板页从而方便灵活的使用系统自带的模 ...

  2. java String 深入理解

    说出下面程序的输出 class StringEqualTest { public static void main(String[] args) { String s1 = "Program ...

  3. Spring资源访问

    资源访问 1.Resource Jdk提供的访问资源的类并不能很好地满足各种底层的资源访问需求, 比如缺少从类路径或者web容器的上下文中获取资源的操作类. 鉴于此, Spring设计了一个Resou ...

  4. ZENG msgbox仿qq提示

    ZENG.msgbox.show("设置成功!", 4, 2000); ZENG.msgbox.show("服务器繁忙,请稍后再试.", 1, 2000); Z ...

  5. EasyUI扩展方法

    EasyUI扩展方法: 1.我想指定textarea的行,但editor:{type:'textarea', options: {rows:'4'}}这样写不行.请问大家怎么配置才是指定行的啊? 配置 ...

  6. MyBatis的返回参数类型和查询结果遍历

    MyBatis的返回参数类型分两种 1. 对应的分类为: 1.1.resultMap: 1.2.resultType: 2 .对应返回值类型: 2.1.resultMap:结果集 2.2.result ...

  7. Xcode插件管理以及Xcode7 升级

    一,Xcode插件管理工具 Alcatraz: mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins; cur ...

  8. 在Window Embedded CE(Wince)下使用OpenNETCF进行路由表的开发

    点击打开链接 背景 在开发3G项目的是时候,发现尽管3G网络连接已经建立成功了,但是数据不能发送成功,查明原因,由于路由表的问题,导致数据往ActiveSync连接的对端,也就是PC发送,而不是发送到 ...

  9. HTML框架与布局

    原文:http://www.cnblogs.com/yyhh/p/4210659.html HTML块 HTML块元素 块元素在显示时,通常会以新行开始 如:<h1>.<p>. ...

  10. axis2通过wsdl生成客户端程序并本地调用

    wsdl2java -uri http://10.0.5.12/brm/services/RuleEngine1374389539674484?wsdl -p east.mvc.webservice. ...