2015年1月24日 星期六

my ide

 

Interface

image

Plugin & vimrc (configure)

set nocompatible              " be iMproved, required
filetype off                  " required
set guioptions-=m  "remove menu bar
set guioptions-=T  "remove toolbar
 
" set the runtime path to include Vundle and initialize
set rtp+=~/vimfiles/bundle/Vundle.vim/
let path='~/vimfiles/bundle'
call vundle#begin(path)
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
 
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'vim-scripts/L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
"for nerdtree
Plugin 'scrooloose/nerdtree'
"commenting
Plugin 'scrooloose/nerdcommenter'
"snipmate
Plugin 'msanders/snipmate.vim'
Plugin 'ervandew/supertab'
"Plugin 'vim-scripts/OmniCppComplete'
 
"file manager
Plugin 'wesleyche/SrcExpl'
Plugin 'vim-scripts/taglist.vim'
Plugin 'wesleyche/Trinity'
Plugin 'tomtom/tlib_vim'
Plugin 'tomtom/tselectbuffer_vim'
Plugin 'vim-scripts/a.vim'
Plugin 'vim-scripts/FuzzyFinder'
"project 
Plugin 'vim-scripts/DfrankUtil'
Plugin 'vim-scripts/project.tar.gz'
Plugin 'vim-scripts/indexer.tar.gz'
Plugin 'vim-scripts/vimprj'
Plugin 'tomtom/TortoiseSVN_vim'
"color sch
Plugin 'junegunn/seoul256.vim'
"marks
"Plugin 'kshenoy/vim-signature'
Plugin 'MattesGroeger/vim-bookmarks' 
"calender
Plugin 'mattn/calendar-vim'
"compiler
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-pathogen'
 
"status bar
Plugin 'bling/vim-airline'
"format
Plugin 'vim-scripts/Align'
Plugin 'Chiel92/vim-autoformat'
Plugin 'mrtazz/DoxygenToolkit.vim'
"fun
Plugin 'mattn/flappyvird-vim'
Plugin 'vim-scripts/TeTrIs.vim'
Plugin 'vim-scripts/sokoban.vim'
 
" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
let g:seoul256_background = 246
"colo seoul256-light
colo seoul256
" 檔案編碼
"set encoding=utf-8
"set fileencodings=utf-8,cp950
 
" 編輯喜好設定                                                                                                                                                                                                     
syntax on        " 語法上色顯示
set nocompatible " VIM 不使用和 VI 相容的模式
" set ai           " 自動縮排
set shiftwidth=4 " 設定縮排寬度 = 4 
set tabstop=4    " tab 的字元數
set softtabstop=4
set expandtab   " 用 space 代替 tab
 
set ruler        " 顯示右下角設定值
set backspace=2  " 在 insert 也可用 backspace
set ic           " 設定搜尋忽略大小寫
set ru           " 第幾行第幾個字
set hlsearch     " 設定高亮度顯示搜尋結果
set incsearch    " 在關鍵字還沒完全輸入完畢前就顯示結果
set smartindent  " 設定 smartindent
set confirm      " 操作過程有衝突時,以明確的文字來詢問
set history=100  " 保留 100 個使用過的指令
set cursorline   " 顯示目前的游標位置
 
set laststatus=2
set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
"key mapping
imap jj <;Esc>
noremap ,bb :TSelectBuffer<;cr>
" Open and close all the three plugins on the same time 
nmap <F7>  :TrinityToggleAll<CR> 
" Open and close the Source Explorer separately 
nmap <;F9>  :TrinityToggleSourceExplorer<CR> 
" Open and close the Taglist separately 
nmap <F10> :TrinityToggleTagList<CR> 
" Open and close the NERD Tree separately 
nmap <;F11> :TrinityToggleNERDTree<CR> 
imap    <;F2>    <C-R>=strftime("%c")<CR>
nmap    ,te :tabedit<;SPACE>
nmap    ,tx    :tabedit .<;CR>
nmap    ,th    :tab help<;CR>
nmap    ,tn    :tabnew<;CR>
 
map <;F5> :call CompileRunGcc()<CR>
func! CompileRunGcc()
exec "w"
exec "make -f ble_app_template.Makefile"
endfunc
 
map <;F6> :call RunGcc()<CR>
func! RunGcc()
exec "w"
exec "! %<"
endfunc
 
set nocp
 " Enable check c
"let g:syntastic_check_on_open = 1
"let g:syntastic_c_checkers = ['gcc', 'make'] 
"let g:syntastic_c_errorformat = '%f:%l:%c: %trror: %m'
"let g:syntastic_always_populate_loc_list = 1
"execute pathogen#infect()
 "airline
"let g:airline#extensions#tabline#enabled = 1
"format
let g:formatprg_c = "astyle"
let g:formatprg_args_c = "--style=allman --pad-oper --min-conditional-indent=0 --max-code-length=120 --add-brackets --break-blocks --delete-empty-lines --indent=spaces=4"
map ,fc :Autoformat<CR><CR> 
"bookmark
let g:bookmark_sign = '>;>'
let g:bookmark_annotation_sign = '##'
let g:bookmark_save_per_working_dir = 1
let g:bookmark_auto_save = 0
let g:bookmark_auto_save_file = '/bookmarks'
let g:bookmark_auto_close = 1
let g:bookmark_highlight_lines = 1
let g:bookmark_show_warning = 0
let g:bookmark_center = 1
 
"DoxygenToolkit
let g:DoxygenToolkit_briefTag_pre="@detail  "
let g:DoxygenToolkit_paramTag_pre="@param[] "
let g:DoxygenToolkit_returnTag="@returns    "
let g:DoxygenToolkit_blockHeader="@brief    function for"
let g:DoxygenToolkit_blockFooter="----------------------------------------------------------------------------"
let g:DoxygenToolkit_authorName="Copyright(C) MediaWave.,Ltd                                                     steven lin,All Right Reserved"
"indexer.tar.gz
"change the tags dir at ram disk
let g:indexer_tagsDirname ="F:\indexer"
map <F3>  :Dox <CR>
"change leader mapping
let mapleader=","
let g:SokobanLevelDirectory="C:\\Users\\steven\\vimfiles\\bundle\\\sokoban.vim\\"
"the tortoise svn
map <F8> :call CommitSVNAll()<CR>
func! CommitSVNAll()
    let buflist = []
    for b in range(1, bufnr('$'))
        if buflisted(b) && filereadable(bufname(b))
            call add(buflist, fnamemodify(bufname(b), ':p'))
        endif
    endfor
    let files = join(buflist, '*')
    if files != ''
        silent exec '!start "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:commit /path:"'.files.'" /closeonend:4'
    else
        call confirm('No files loaded')
    endif
endfunc
map ff <;esc>:FufFile<cr>
map fcd <;esc>:FufDir<cr>
map fbw <;esc>:FufBufferTagAllWithCursorWord<cr>
map fbb <;esc>:FufBuffer<cr>
 


make operator


A.make


image


:copen


image


download:


…………………


ref:


vim make:


https://www.cs.oberlin.edu/~kuperman/help/vim/makefiles.html

2015年1月11日 星期日

linux 套件管理

APT

1.apt-get update 取得最新的軟體套件目錄.

  其組態在/etc/apt/sources.list 中.及 /etc/apt/sources.list.d/raspi.list

分別是指 基礎作業系統發佈套件 及 其它套件.

其內容

image

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi

deb : 定義發佈套件的形式

http://mirrordirector.raspbian.org/raspbian/  : 其根目錄的位置.

wheezy : 版本的名稱

main contrib non-free rpi : 指定套件元件清單

最後,在更新後用apt-get update 及apt-get dist-upgrade 更新

 

2. 尋找軟体套件(apt-cache)

image

3. APT 安裝(apt-get install)

image

4. 套件管厘(aptitude) .== apt-get and apt-cache

image

u: 更新套件快取

U:選取更新的套件

/:搜尋

+/- :選取

g:安裝