vim的配置安装和Python安装细节记录20190109
生活随笔
收集整理的這篇文章主要介紹了
vim的配置安装和Python安装细节记录20190109
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
vim:
vim記得以前版本是8.0;現在最新的版本是8.1;而且是安裝版本,不是已經編譯好的版本;可以直接安裝
需要git vundle安裝 到bundle/vundle目錄下;
安裝插件的命令全部由bundle 改成plugin
vimrc文件配置用以前很多錯誤
目前沒有錯誤的先記錄下:
" Vim with all enhancements source $VIMRUNTIME/vimrc_example.vim" Use the internal diff if available. " Otherwise use the special 'diffexpr' for Windows. if &diffopt !~# 'internal'set diffexpr=MyDiff() endif function MyDiff()let opt = '-a --binary 'if &diffopt =~ 'icase' | let opt = opt . '-i ' | endifif &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endiflet arg1 = v:fname_inif arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endiflet arg1 = substitute(arg1, '!', '\!', 'g')let arg2 = v:fname_newif arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endiflet arg2 = substitute(arg2, '!', '\!', 'g')let arg3 = v:fname_outif arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endiflet arg3 = substitute(arg3, '!', '\!', 'g')if $VIMRUNTIME =~ ' 'if &sh =~ '\<cmd'if empty(&shellxquote)let l:shxq_sav = ''set shellxquote&endiflet cmd = '"' . $VIMRUNTIME . '\diff"'elselet cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'endifelselet cmd = $VIMRUNTIME . '\diff'endiflet cmd = substitute(cmd, '!', '\!', 'g')silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3if exists('l:shxq_sav')let &shellxquote=l:shxq_savendif endfunction" =============================================Bundle_start========================= set rtp+=$vim/vim81/bundle/vundle "call vundle#begin('$vim/vim81/bundle') ? call vundle#begin() Plugin 'gmarik/vundle' "===tagbar Plugin 'majutsushi/tagbar' "nmap <Leader>tb :TagbarToggle<CR> ? ? ? ?? ? ? ? ? ? ? ? ? ?"autocmd BufReadPost *.cpp,*.c,*.h,*.hpp,*.cc,*.cxx call tagbar#autoopen() ? ? "如果是c語言的程序的話,tagbar自動開啟 "======NERDTree Plugin 'scrooloose/nerdtree'Plugin 'bling/vim-airline' Plugin 'powerline/powerline'"=========自動補全 "Bundle 'Valloric/YouCompleteMe' "==========安裝VIM-IPYTHON插件 "Bundle 'vim-ipython' "================快速運行,一鍵運行python代碼,此處設置F10 Plugin 'thinca/vim-quickrun'"=============自動補全單引號,雙引號等 Plugin 'Raimondi/delimitMate'"syntastic檢查語法與編碼風格 "Bundle 'scrooloose/syntastic' Plugin 'christoomey/vim-tmux-navigator'"markdown Plugin '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=30 set laststatus=2 map <F2> :NERDTreeToggle<CR>"=============================================Plugin set over==========================" ===============================system_set_start======================= inoremap ( ()<ESC>i inoremap [ []<ESC>i inoremap { {}<ESC>i inoremap < <><ESC>i inoremap ' ''<ESC>i inoremap " ""<ESC>i set ts=4 set number set ruler syntax on set mouse=a set cindent set shiftwidth=4 set expandtab let &termencoding=&encoding set fileencodings=utf-8,gbk " 設置不產生交換文件 set noswapfile " 設置高亮行 set cursorcolumn set cursorline" 設置顯行號 set nu "設置折疊set fdm=marker " 取消VIM的自動備份功能 set noundofile set nobackup set noswapfile " 設置縮進,以4個空格作為縮進 set tabstop=4set sts=4set expandtabset softtabstop=4set shiftwidth=4set autoindentset cindent " 修改配色方案 colorscheme solarized " change 目錄 set gfn=Courier_New:h14 " ====修改文件打開目錄==== " cd D:\code\Python set 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,latin1 set langmenu=zh_CN let $LANG = 'zh_CN.UTF-8'" 解決consle輸出亂碼 language messages zh_CN.utf-8" 解決菜單亂碼 source $VIMRUNTIME/delmenu.vim source $VIMRUNTIME/menu.vim" 設置終端編碼為gvim內部編碼encoding let &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,"")elsecall 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 G endfunc " for # indent, python文件中輸入新行時#號注釋不切回行首 autocmd BufNewFile,BufRead *.py inoremap # X<c-h>#" ================================python set over====================================python:
anaconda distributioin版本要安裝64版本;不小心安裝了個32版本;最后tensorflow安裝不上;tensorflow一定要求64位的python
后面安裝了最新的anaconda python3.7,最后發現tensorflow版本還沒跟上;最新只能支持python3.6的
?
?
總結
以上是生活随笔為你收集整理的vim的配置安装和Python安装细节记录20190109的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VC维的理解
- 下一篇: tensorflow中sess.run第