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的

 

 

上一篇:tensorflow中sess.run第一个参数衣服不能随便穿
下一篇:VC维的理解

发表评论

最新留言

表示我来过!
[***.240.166.169]2025年04月19日 00时12分16秒