Vim相关优化和配置
升级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相关优化和配置的更多相关文章
- 20190726_安装CentOS7minimal版本后需要做的优化和配置
20190726_安装CentOS7minimal版本后需要做的优化和配置 CentOS系统镜像下载地址:https://www.centos.org/ CentOS的Minimal(最小化安装版本) ...
- Ubuntu下VIM的安装及其配置——Linux篇
一.Ubuntu系统默认内置: 实际上ubuntu默认没有安装老版本的vi,只装了vim.vi是vim.tiny(vim的最小化版本,不含 GUI,并且仅含有一小部分功能,并且默认与vi兼容.此软件包 ...
- Linux下Openfire相关安装和配置
记录下来,方便下次再用时从头查找资料 小京东ecshop中的通讯有用到openfire,Window下配置安装很简单,直接下载exe文件安装就行,而linux下要麻烦一点.安装后的配置下面会细说: 一 ...
- shell 环境变量的相关配置文件和配置方法
shell 环境变量的相关配置文件和配置方法: bash 的配置文件: 全局配置: /etc/profile, /etc/profile.d/*.sh, /etc/bashrc 个人配置 ~/.bas ...
- ubuntu的安装与vim(部分)文件的配置
Ubuntu的安装与vim相关的配置 虚拟机环境的安装(先说说虚拟机的安装步骤把) 对于安装ubuntu来讲不是很难掌握,但是在Linux系统虚拟机下提供了很多便利的手段,而要配置一个顺手的虚拟机环境 ...
- mysql系列十一、mysql优化笔记:表设计、sql优化、配置优化
可以从这些方面进行优化: 数据库(表)设计合理 SQL语句优化 数据库配置优化 系统层.硬件层优化 数据库设计 关系数据库三范式 1NF:字段不可分; 2NF:有主键,非主键字段依赖主键; 3NF:非 ...
- Vim 插键及配置
如果你觉得这个页面广告太多,欢迎移步博客阅读:Vim 插键及配置 编辑器之神 -- Vim 平日使用vim经常编辑文件,想想使用时的痛点,决定研究一下插件的使用. Vim的扩展通常也被成为bundle ...
- Tomcat 5常用优化和配置
Tomcat 5常用优化和配置 1.JDK内存优化:Tomcat默认可以使用的内存为128MB,Windows下,在文件{tomcat_home}/bin/catalina.bat,Unix下,在文件 ...
- linux应用之vim的安装与配置(centos)
1.vim的安装 #yum search vim //查看vim相关软件信息 #yum install -y vim* //在线安装vim 2.vim的配置 (1)~/.viminfo 在vim ...
随机推荐
- 探索Python F-strings是如何工作
PEP 498 提出一种新型字符串格式化机制,被称为“字符串插值”或者更常见的一种称呼是F-strings(主要因为这种字符串的第一个字母是f).F-strings提供了一种明确且方便的方式将pyth ...
- 【LeetCode】68. Text Justification
Text Justification Given an array of words and a length L, format the text such that each line has e ...
- 【LeetCode】103. Binary Tree Zigzag Level Order Traversal
Binary Tree Zigzag Level Order Traversal Given a binary tree, return the zigzag level order traversa ...
- tomcat发布web项目,支持域名
首先需要安装JDK,不是Linux自带的OpenJDK,参考下面的文章: centos下 安装jdk 设置java环境变量:编辑这个/etc/profile文件: export JAVA_HOME=/ ...
- atitit.资源释放机制--attilax总结
atitit.资源释放机制--attilax总结 1. .全手工, 1 2. 引用计数, 1 2.1. 成本也显而易见. 1 2.2. 循环引用的问题, 2 2.3. 引用计数方式事实上也有经典的卡顿 ...
- struts2 的国际化
一.使用步骤 1)写资源文件,资源文件名命名规范和之前的讲的一致,有疑问请参考java开发中国际化 2)配置,在 struts.xml 中使用常量进行加载 struts.custom.i18n.res ...
- python3的pip管理器pip3
一且因为python2到3的痛苦升级,python3的pip程序也有一个别致的名字pip3 安装: apt-get install python3-pip 安装后不能直接使用pip,否则会提示没有安装 ...
- C++一次指针问题和解决(char指针乱码)
问题始末 struct NameGroup { char* Name1; char* Name2; }; NameGroup A() { NameGroup result; //From other ...
- List<T>做数据源绑定的问题
List<C_Pinpai> lc;// = new List<C_Pinpai>(); private void BindGrid() { //if (lc.Count &g ...
- tornado WebSocket详解
1.什么是WebSocketwebsocket和长轮询的区别是客户端和服务器之间是持久连接的双向通信.协议使用ws://URL格式,但它在是在标准HTTP上实现的. 2.tornado的WebSock ...