升级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. 20190726_安装CentOS7minimal版本后需要做的优化和配置

    20190726_安装CentOS7minimal版本后需要做的优化和配置 CentOS系统镜像下载地址:https://www.centos.org/ CentOS的Minimal(最小化安装版本) ...

  2. Ubuntu下VIM的安装及其配置——Linux篇

    一.Ubuntu系统默认内置: 实际上ubuntu默认没有安装老版本的vi,只装了vim.vi是vim.tiny(vim的最小化版本,不含 GUI,并且仅含有一小部分功能,并且默认与vi兼容.此软件包 ...

  3. Linux下Openfire相关安装和配置

    记录下来,方便下次再用时从头查找资料 小京东ecshop中的通讯有用到openfire,Window下配置安装很简单,直接下载exe文件安装就行,而linux下要麻烦一点.安装后的配置下面会细说: 一 ...

  4. shell 环境变量的相关配置文件和配置方法

    shell 环境变量的相关配置文件和配置方法: bash 的配置文件: 全局配置: /etc/profile, /etc/profile.d/*.sh, /etc/bashrc 个人配置 ~/.bas ...

  5. ubuntu的安装与vim(部分)文件的配置

    Ubuntu的安装与vim相关的配置 虚拟机环境的安装(先说说虚拟机的安装步骤把) 对于安装ubuntu来讲不是很难掌握,但是在Linux系统虚拟机下提供了很多便利的手段,而要配置一个顺手的虚拟机环境 ...

  6. mysql系列十一、mysql优化笔记:表设计、sql优化、配置优化

    可以从这些方面进行优化: 数据库(表)设计合理 SQL语句优化 数据库配置优化 系统层.硬件层优化 数据库设计 关系数据库三范式 1NF:字段不可分; 2NF:有主键,非主键字段依赖主键; 3NF:非 ...

  7. Vim 插键及配置

    如果你觉得这个页面广告太多,欢迎移步博客阅读:Vim 插键及配置 编辑器之神 -- Vim 平日使用vim经常编辑文件,想想使用时的痛点,决定研究一下插件的使用. Vim的扩展通常也被成为bundle ...

  8. Tomcat 5常用优化和配置

    Tomcat 5常用优化和配置 1.JDK内存优化:Tomcat默认可以使用的内存为128MB,Windows下,在文件{tomcat_home}/bin/catalina.bat,Unix下,在文件 ...

  9. linux应用之vim的安装与配置(centos)

    1.vim的安装 #yum search vim   //查看vim相关软件信息 #yum install -y vim*  //在线安装vim 2.vim的配置 (1)~/.viminfo 在vim ...

随机推荐

  1. JavaScript 中 substr 和 substring的区别

    http://www.cnblogs.com/meil/archive/2007/01/05/598528.htmlString.substr(N1,N2) 这个就是我们常用的从指定的位置(N1)截取 ...

  2. 实战DeviceIoControl系列之四:获取硬盘的详细信息

    Q 用IOCTL_DISK_GET_DRIVE_GEOMETRY IOCTL_STORAGE_GET_MEDIA_TYPES_EX只能得到很少的磁盘参数,我想获得包括硬盘序列号在内的更加详细的信息,有 ...

  3. SQLyog之MySQL客户端的下载、安装和使用(旗舰版)(推荐)

    不多说,直接上干货! 福利 => 每天都推送 欢迎大家,关注微信扫码并加入我的4个微信公众号:   大数据躺过的坑      Java从入门到架构师      人工智能躺过的坑          ...

  4. CentOS-6.5下安装navicat for mysql

    一.安装前准备 安装epel源        安装wine        如果不安装wine,则可能会出现安装完navicat for mysql后无法启动的情况. 二.安装epel源 cd /tmp ...

  5. JavaScript:Object.prototype.toString进行数据类型判定

    在JavaScript中,想要判断某个对象值属于哪种内置类型,最靠谱的做法就是通过Object.prototype.toString方法. var arr = []; console.log(Obje ...

  6. android对话框,checkBox,同一时候在同一个页面上保存数据

    package com.example.selectonlyonle; import android.app.Activity; import android.app.AlertDialog; imp ...

  7. 关于搭配junit 和JUnit报initializationError的解决方法

    关于junit是什么就不复述了,网上有 junit的source code是可以下载的,各个版本都有 地址:https://github.com/junit-team 通过junit 的source ...

  8. 452. Remove Linked List Elements【Naive】

    Remove all elements from a linked list of integers that have value val. Example Given 1->2->3- ...

  9. 1.3 Seven Testing Principles

    1.3 Seven Testing Principles 2015-06-23 Principle 1 - Testing shows presence of defects(测试显示存在缺陷) Te ...

  10. FreeRTOS官方翻译文档——第二章 队列管理

    2.1 概览基于 FreeRTOS 的应用程序由一组独立的任务构成——每个任务都是具有独立权限的小程序.这些独立的任务之间很可能会通过相互通信以提供有用的系统功能.FreeRTOS 中所有的通信与同步 ...