
vim的配置安装和Python安装细节记录20190109
发布日期:2021-05-06 21:47:47
浏览次数:29
分类:精选文章
本文共 5611 字,大约阅读时间需要 18 分钟。
vim:
vim记得以前版本是8.0;现在最新的版本是8.1;而且是安装版本,不是已经编译好的版本;可以直接安装
需要git vundle安装 到bundle/vundle目录下;
安装插件的命令全部由bundle 改成plugin
vimrc文件配置用以前很多错误
目前没有错误的先记录下:
" Vim with all enhancementssource $VIMRUNTIME/vimrc_example.vim" Use the internal diff if available." Otherwise use the special 'diffexpr' for Windows.if &diffopt !~# 'internal' set diffexpr=MyDiff()endiffunction MyDiff() let opt = '-a --binary ' if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif let arg1 = v:fname_in if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif let arg1 = substitute(arg1, '!', '\!', 'g') let arg2 = v:fname_new if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif let arg2 = substitute(arg2, '!', '\!', 'g') let arg3 = v:fname_out if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif let arg3 = substitute(arg3, '!', '\!', 'g') if $VIMRUNTIME =~ ' ' if &sh =~ '\' . arg3 if exists('l:shxq_sav') let &shellxquote=l:shxq_sav endifendfunction" =============================================Bundle_start=========================set rtp+=$vim/vim81/bundle/vundle"call vundle#begin('$vim/vim81/bundle') call vundle#begin()Plugin 'gmarik/vundle'"===tagbarPlugin 'majutsushi/tagbar'"nmap tb :TagbarToggle "autocmd BufReadPost *.cpp,*.c,*.h,*.hpp,*.cc,*.cxx call tagbar#autoopen() "如果是c语言的程序的话,tagbar自动开启"======NERDTreePlugin 'scrooloose/nerdtree'Plugin 'bling/vim-airline'Plugin 'powerline/powerline'"=========自动补全"Bundle 'Valloric/YouCompleteMe'"==========安装VIM-IPYTHON插件"Bundle 'vim-ipython'"================快速运行,一键运行python代码,此处设置F10Plugin 'thinca/vim-quickrun'"=============自动补全单引号,双引号等Plugin 'Raimondi/delimitMate'"syntastic检查语法与编码风格"Bundle 'scrooloose/syntastic'Plugin 'christoomey/vim-tmux-navigator'"markdownPlugin 'godlygeek/tabular'Plugin 'plasticboy/vim-markdown'Plugin 'iamcco/mathjax-support-for-mkdp'Plugin 'iamcco/markdown-preview.vim'call vundle#end()filetype plugin indent on "=============================================Bundle_over========================="=============================================Plugin set start==========================let NERDTreeWinPos='left'let NERDTreeWinSize=30set laststatus=2map :NERDTreeToggle "=============================================Plugin set over==========================" ===============================system_set_start=======================inoremap ( () iinoremap [ [] iinoremap { {} iinoremap < <> iinoremap ' '' iinoremap " "" iset ts=4set numberset rulersyntax onset mouse=aset cindentset shiftwidth=4set expandtablet &termencoding=&encodingset fileencodings=utf-8,gbk" 设置不产生交换文件set noswapfile" 设置高亮行set cursorcolumnset cursorline" 设置显行号set nu"设置折叠 set fdm=marker" 取消VIM的自动备份功能set noundofileset nobackupset noswapfile" 设置缩进,以4个空格作为缩进set tabstop=4 set sts=4 set expandtab set softtabstop=4 set shiftwidth=4 set autoindent set cindent" 修改配色方案colorscheme solarized" change 目录set gfn=Courier_New:h14" ====修改文件打开目录====" cd D:\code\Pythonset autochdir" gvim内部编码set encoding=utf-8" 当前编辑的文件编码set fileencoding=utf-8" gvim打开支持编码的文件set fileencodings=ucs-bom,utf-8,gbk,cp936,gb2312,big5,euc-jp,euc-kr,latin1set langmenu=zh_CNlet $LANG = 'zh_CN.UTF-8'" 解决consle输出乱码language messages zh_CN.utf-8" 解决菜单乱码source $VIMRUNTIME/delmenu.vimsource $VIMRUNTIME/menu.vim" 设置终端编码为gvim内部编码encodinglet &termencoding=&encoding" 防止特殊符号无法正常显示set ambiwidth=double" ===============================system_set_end=======================================" ================================python set start====================================autocmd BufNewFile *.py,*.sh exec ":call SetTitle()"""定义函数SetTitle,自动插入文件头func SetTitle() "如果文件类型为.sh文件 if &filetype == 'sh' call setline(1,"\#########################################################################") call append(line("."), "\# File Name: ".expand("%")) call append(line(".")+1, "\# Author: Nyang") call append(line(".")+2, "\# mail: ning.y@hongfans.cn") call append(line(".")+3, "\# Created Time: ".strftime("%c")) call append(line(".")+4, "\######################################################################") call append(line(".")+5, "\#!/bin/bash") call append(line(".")+6, "") elseif &filetype == 'python' call setline(1, "/**************************************************************") call append(line("."), "\# > File Name: ".expand("%")) call append(line(".")+1, "\# > Author: Nyang") call append(line(".")+2, " \# > Mail: ning.y@hongfans.cn") call append(line(".")+3, " \# > Created Time: ".strftime("%c")) call append(line(".")+4, " \######################################################") call append(line(".")+5, "#!/usr/bin/python") call append(line(".")+6, "# -*- coding:utf-8 -*-") call append(line(".")+7,"") else call setline(1, "/*************************************************************************") call append(line("."), " > File Name: ".expand("%")) call append(line(".")+1, " > Author: xxxxx") call append(line(".")+2, " > Mail: xxxxxxxx@gmail.com ") call append(line(".")+3, " > Created Time: ".strftime("%c")) call append(line(".")+4, " \######################################################") call append(line(".")+5, "") endif "新建文件后,自动定位到文件末尾 autocmd BufNewFile * normal Gendfunc" for # indent, python文件中输入新行时#号注释不切回行首autocmd BufNewFile,BufRead *.py inoremap # X #" ================================python set over====================================
python:
anaconda distributioin版本要安装64版本;不小心安装了个32版本;最后tensorflow安装不上;tensorflow一定要求64位的python
后面安装了最新的anaconda python3.7,最后发现tensorflow版本还没跟上;最新只能支持python3.6的
发表评论
最新留言
表示我来过!
[***.240.166.169]2025年04月19日 00时12分16秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
基于Mustache实现sql拼接
2021-05-09
气球游戏腾讯面试题滑动窗口解法
2021-05-09
POJ 2260 Error Correction 模拟 贪心 简单题
2021-05-09
POJ - 1328 Radar Installation 贪心
2021-05-09
CSUOJ Water Drinking
2021-05-09
自定义博客园博客的背景图片
2021-05-09
Spring MVC+javamail实现邮件发送
2021-05-09
Asp.NET Core 限流控制-AspNetCoreRateLimit
2021-05-09
gRPC在 ASP.NET Core 中应用学习(一)
2021-05-09
@SuppressWarnings 用法
2021-05-09
看完你就明白的锁系列之锁的状态
2021-05-09
看完这篇操作系统,和面试官扯皮就没问题了
2021-05-09
我的价值观
2021-05-09
真香!Linux 原来是这么管理内存的
2021-05-09
一文详解 Java 并发模型
2021-05-09
阅站无数!不过我只推荐下面这些
2021-05-09
值类型与引用类型(中)
2021-05-09
MSSQL 2005 数据库变成可疑状态
2021-05-09
QBlog V2.5 源码开放下载(ASP.NET 番外系列之开端)
2021-05-09
秋色园引发CPU百分百命案的事件分析与总结
2021-05-09