1.安装

apt-get install vim

2.配置

这是我的vim 配饰文件,基本的功能都能实现,在这里做一个备份,省的以后重装系统还要到处找这个配置文件(/etc/vim/vimrc) :
 
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below.  If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed.  It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option.
 
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
 
" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'.  Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible
 
" Vim5 and later versions support syntax highlighting. Uncommenting the
" following enables syntax highlighting by default.
if has("syntax")
  syntax on
endif
 
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark
 
" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
"  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"endif
 
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
"  filetype plugin indent on
"endif
 
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd" Show (partial) command in status line.
"set showmatch" Show matching brackets.
"set ignorecase" Do case insensitive matching
"set smartcase" Do smart case matching
"set incsearch" Incremental search
"set autowrite" Automatically save before commands like :next and :make
"set hidden             " Hide buffers when they are abandoned
"set mouse=a" Enable mouse usage (all modes)
 
"*******************************************************
"Personal configuration
"*******************************************************
set fileencodings=utf-8,gbk,ucs-bom,cp936
set encoding=utf-8
set nocompatible
set number
filetype on 
filetype indent on
filetype plugin on
set history=1000 
set background=dark 
syntax on 
"set autoindent
"set smartindent
set showmatch
set guioptions-=T
set vb t_vb=
set ruler
set nohls
:set cindent
set tabstop=4
set shiftwidth=8
set incsearch
set cursorline
set nobackup
set mouse=a
set hlsearch "set high light search, cancel the high light is set nohlsearch
 
:set  laststatus=2
:set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
 
 
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CSCOPE settings for vim           
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" This file contains some boilerplate settings for vim's cscope interface,
" plus some keyboard mappings that I've found useful.
"
" USAGE: 
" -- vim 6:     Stick this file in your ~/.vim/plugin directory (or in a
"               'plugin' directory in some other directory that is in your
"               'runtimepath'.
"
" -- vim 5:     Stick this file somewhere and 'source cscope.vim' it from
"               your ~/.vimrc file (or cut and paste it into your .vimrc).
"
" NOTE: 
" These key maps use multiple keystrokes (2 or 3 keys).  If you find that vim
" keeps timing you out before you can complete them, try changing your timeout
" settings, as explained below.
"
" Happy cscoping,
"
" Jason Duell       jduell@alumni.princeton.edu     2002/3/7
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 
" This tests to see if vim was configured with the '--enable-cscope' option
" when it was compiled.  If it wasn't, time to recompile vim... 
if has("cscope")
 
    """"""""""""" Standard cscope/vim boilerplate
 
    " use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t'
    set cscopetag
 
    " check cscope for definition of a symbol before checking ctags: set to 1
    " if you want the reverse search order.
    set csto=0
 
    " add any cscope database in current directory
    if filereadable("cscope.out")
        cs add cscope.out  
    " else add the database pointed to by environment variable 
    elseif $CSCOPE_DB != ""
        cs add $CSCOPE_DB
    endif
 
    " show msg when any other cscope db added
    set cscopeverbose  
 
 
    """"""""""""" My cscope/vim key mappings
    "
    " The following maps all invoke one of the following cscope search types:
    "
    "   's'   symbol: find all references to the token under cursor
    "   'g'   global: find global definition(s) of the token under cursor
    "   'c'   calls:  find all calls to the function name under cursor
    "   't'   text:   find all instances of the text under cursor
    "   'e'   egrep:  egrep search for the word under cursor
    "   'f'   file:   open the filename under cursor
    "   'i'   includes: find files that include the filename under cursor
    "   'd'   called: find functions that function under cursor calls
    "
    " Below are three sets of the maps: one set that just jumps to your
    " search result, one that splits the existing vim window horizontally and
    " diplays your search result in the new window, and one that does the same
    " thing, but does a vertical split instead (vim 6 only).
    "
    " I've used CTRL-\ and CTRL-@ as the starting keys for these maps, as it's
    " unlikely that you need their default mappings (CTRL-\'s default use is
    " as part of CTRL-\ CTRL-N typemap, which basically just does the same
    " thing as hitting 'escape': CTRL-@ doesn't seem to have any default use).
    " If you don't like using 'CTRL-@' or CTRL-\, , you can change some or all
    " of these maps to use other keys.  One likely candidate is 'CTRL-_'
    " (which also maps to CTRL-/, which is easier to type).  By default it is
    " used to switch between Hebrew and English keyboard mode.
    "
    " All of the maps involving the <cfile> macro use '^<cfile>$': this is so
    " that searches over '#include <time.h>" return only references to
    " 'time.h', and not 'sys/time.h', etc. (by default cscope will return all
    " files that contain 'time.h' as part of their name).
 
 
    " To do the first type of search, hit 'CTRL-\', followed by one of the
    " cscope search types above (s,g,c,t,e,f,i,d).  The result of your cscope
    " search will be displayed in the current window.  You can use CTRL-T to
    " go back to where you were before the search.  
    "
 
    nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR> 
    nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
    nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR> 
 
 
    " Using 'CTRL-spacebar' (intepreted as CTRL-@ by vim) then a search type
    " makes the vim window split horizontally, with search result displayed in
    " the new window.
    "
    " (Note: earlier versions of vim may not have the :scs command, but it
    " can be simulated roughly via:
    "    nmap <C-@>s <C-W><C-S> :cs find s <C-R>=expand("<cword>")<CR><CR> 
 
    nmap <C-@>s :scs find s <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-@>g :scs find g <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-@>c :scs find c <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-@>t :scs find t <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-@>e :scs find e <C-R>=expand("<cword>")<CR><CR> 
    nmap <C-@>f :scs find f <C-R>=expand("<cfile>")<CR><CR> 
    nmap <C-@>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR> 
    nmap <C-@>d :scs find d <C-R>=expand("<cword>")<CR><CR> 
 
 
    " Hitting CTRL-space *twice* before the search type does a vertical 
    " split instead of a horizontal one (vim 6 and up only)
    "
    " (Note: you may wish to put a 'set splitright' in your .vimrc
    " if you prefer the new window on the right instead of the left
 
    nmap <C-@><C-@>s :vert scs find s <C-R>=expand("<cword>")<CR><CR>
    nmap <C-@><C-@>g :vert scs find g <C-R>=expand("<cword>")<CR><CR>
    nmap <C-@><C-@>c :vert scs find c <C-R>=expand("<cword>")<CR><CR>
    nmap <C-@><C-@>t :vert scs find t <C-R>=expand("<cword>")<CR><CR>
    nmap <C-@><C-@>e :vert scs find e <C-R>=expand("<cword>")<CR><CR>
    nmap <C-@><C-@>f :vert scs find f <C-R>=expand("<cfile>")<CR><CR> 
    nmap <C-@><C-@>i :vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR> 
    nmap <C-@><C-@>d :vert scs find d <C-R>=expand("<cword>")<CR><CR>
 
 
    """"""""""""" key map timeouts
    "
    " By default Vim will only wait 1 second for each keystroke in a mapping.
    " You may find that too short with the above typemaps.  If so, you should
    " either turn off mapping timeouts via 'notimeout'.
    "
    "set notimeout 
    "
    " Or, you can keep timeouts, by uncommenting the timeoutlen line below,
    " with your own personal favorite value (in milliseconds):
    "
    "set timeoutlen=4000
    "
    " Either way, since mapping timeout settings by default also set the
    " timeouts for multicharacter 'keys codes' (like <F1>), you should also
    " set ttimeout and ttimeoutlen: otherwise, you will experience strange
    " delays as vim waits for a keystroke after you hit ESC (it will be
    " waiting to see if the ESC is actually part of a key code like <F1>).
    "
    "set ttimeout 
    "
    " personally, I find a tenth of a second to work well for key code
    " timeouts. If you experience problems and have a slow terminal or network
    " connection, set it higher.  If you don't set ttimeoutlen, the value for
    " timeoutlent (default: 1000 = 1 second, which is sluggish) is used.
    "
    "set ttimeoutlen=100
 
endif
 
 
" Title:        Verilog HDL/SystemVerilog HDVL indent file
" Maintainer: Mingzhi Li <limingzhi05@mail.nankai.edu.cn>
" Last Change: 2007-12-16 20:10:57 CST
"
" Buffer Variables:
"     b:verilog_indent_width   : indenting width(default value: shiftwidth)
"
" Install:
"     Drop it to ~/.vim/indent 
"
" URL:
"    http://www.vim.org/scripts/script.php?script_id=2091
"
" Revision Comments:
"     Mingzhi Li  2007-12-16 20:09:39 CST Version 1.2      
"        Bug fixes
"     Mingzhi Li  2007-12-13 23:47:54 CST Version 1.1      
"        Bug fix, improve performance and add introductions
"     Mingzhi Li  2007-12-7  22:16:41 CST Version 1.0  
"        Initial version
"       
" Known Limited:
"     This indent file can not work well, when you break the long line into
"     multi-line manually, such as:
"      always @(posedge a or posedge b 
"          or posedge c ) begin
"         //...
"      end 
"     Recommend to use the coding style(wraped by vim automatically) as following:
"       always @(posedge a or posedge b or posedge c ) begin
"         //...
"       end 
 
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
  finish
endif
let b:did_indent = 1
 
setlocal indentexpr=GetVerilog_SystemVerilogIndent()
setlocal indentkeys=!^F,o,O,0),0},0{,=begin,=end,=fork,=join,=endcase,=join_any,=join_none
setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify
setlocal indentkeys+==endclass,=endpackage,=endsequence,=endclocking
setlocal indentkeys+==endinterface,=endgroup,=endprogram,=endproperty
setlocal indentkeys+==`else,=`endif
 
" Only define the function once.
if exists("*GetVerilog_SystemVerilogIndent")
  finish
endif
 
set cpo-=C
 
function s:comment_ind(lnum)
  let line = getline(a:lnum)
  if line =~ '^\s*\/\/'
    return -1
  endif
 
  let firstPos = match(line,'\S') + 1
  if firstPos == 0
    return -1
  endif
 
  let endPos   = match(line,'\s*$') 
  let flag1 = 0
  let flag2 = 0
  if (synIDattr(synID(a:lnum, firstPos, 1), "name") =~? '\(Comment\|String\)$')
    let flag1 = 1
  endif
 
  if (synIDattr(synID(a:lnum, endPos, 1), "name") =~? '\(Comment\|String\)$' )
    let flag2 = 1
  endif
 
  if ((1 == flag1)&&(1 == flag2))
    let firstPos = match(line,'\*\/') + 2
 
    if (synIDattr(synID(a:lnum, firstPos, 1), "name") =~? '\(Comment\|String\)$')
      return -1
    else
      return 3
    endif
  endif
 
  if (1 == flag1)
    return 1
  endif
 
  if (1 == flag2)
    return 0
  endif
 
 
  return 2
 
endfunction
 
function s:prevnonblanknoncomment(lnum)
  let lnum = prevnonblank(a:lnum)
 
  while lnum > 0
    if (-1 != s:comment_ind(lnum))
      break
    endif
    let lnum = prevnonblank(lnum - 1)
  endwhile
  return lnum
endfunction
 
function s:removecommment(line,comment_ind)
 
  if (a:comment_ind ==  2)
    return a:line
  endif
 
  if (a:comment_ind == -1)
    return ""
  endif
 
  if (a:comment_ind == 1)
    return substitute(a:line,'^.\{-}\*\/',"","")
  endif
 
  let myline01 = a:line;
  
  if (a:comment_ind == 3)
    let myline01 = substitute(myline01,'^.\{-}\*\/',"","")
  endif
 
  let myline01 = substitute(myline01,'\/\*.*$',"","")
  return substitute(myline01,'\/\/.*$',"","")
 
endfunction
 
 
function GetVerilog_SystemVerilogIndent()
 
  if exists('b:verilog_indent_width')
    let offset = b:verilog_indent_width
  else
    let offset = &sw
  endif
 
 
  " Find a non-blank and valid line above the current line.
  let lnum = s:prevnonblanknoncomment(v:lnum - 1)
 
  " At the start of the file use zero indent.
  if lnum == 0
    return 0
  endif
 
  let ind  = indent(lnum)
 
  let curr_line_ind = s:comment_ind(v:lnum)
  "if curr_line_ind == -1
  "  return ind
  "endif
 
  let curr_line  = s:removecommment(getline(v:lnum),curr_line_ind)
  let curr_line2 = substitute(curr_line,'^\s*','','')
 
  let match_result = matchstr(curr_line2,'^\<\(end\|else\|end\(case\|task\|function\|clocking\|interface\|module\|class\|specify\|package\|sequence\|group\|property\)\|join\|join_any\|join_none\)\>\|^}\|`endif\|`else')
 
 
    if len(match_result) > 0
      if match_result =~ '\<end\>'
        let match_start = '\<begin\>'
        let match_mid   = ''
        let match_end   = '\<end\>'
 
      elseif match_result =~ '\<else\>'
        let last_line_ind = s:comment_ind(lnum)
        let last_line  = s:removecommment(getline(lnum),last_line_ind)
 
        if last_line =~ '^\s*end\|^\s*}'
          return indent(lnum)
        else
          let match_start = '\<if\>'
          let match_mid   = ''
          let match_end   = '\<else\>'
        endif
 
      elseif match_result =~ 'join'
        let match_start = '\<fork\>'
        let match_mid   = ''
        let match_end   = '\<\(join\|join_none\|join_any\)\>'
 
      elseif match_result =~ '}'
        let match_start = '{'
        let match_mid   = ''
        let match_end   = '}'
 
      elseif match_result =~ '`else'
        let match_start = '`if'
        let match_mid   = ''
        let match_end   = '`else'
 
      elseif match_result =~ '`endif'
        let match_start = '`if'
        let match_mid   = '`else'
        let match_end   = '`endif'
 
      else
        let match_start = substitute(match_result,'^end','','')
        let match_start = '\<' . match_start . '\>'
        let match_mid   = ''
        let match_end   = '\<' . match_result. '\>'
      endif
 
 
      call cursor(v:lnum,1)
      let match_line = searchpair(match_start,match_mid,match_end,'bW',
            \" synIDattr(synID(line('.'),col('.'),1),'name')"
            \. "=~? '\\(Comment\\|String\\)$'")
 
      if match_line > 0
        return indent(match_line)
      endif
 
    endif
 
 
  let last_line_ind = s:comment_ind(lnum)
  let last_line  = s:removecommment(getline(lnum),last_line_ind)
 
 
  let indent0 = 0
  let indent1 = 0
  let indent2 = 0
 
  let de_indent0 = 0
 
  let pat0 = '[{(]\s*$'
  let pat1 = '\<\(begin\|fork\)\>\s*\(:\s*\w\+\s*\)\=\s*$'
  let pat2 = '`\@<!\<\(if\|else\)\>'
  let pat3 = '\<\(always\|initial\|for\|foreach\|always_comb\|always_ff\|always_latch\|final\|repeat\|while\|constraint\|do\)\>'
  let pat5 = '\<\(case\%[[zx]]\|task\|function\|class\|interface\|clocking\|randcase\|package\|specify\)\>'
  let pat6 = '^\s*\(\w\+\s*:\)\=\s*\<covergroup\>'
  let pat7 = '^\s*\<\(begin\|fork\)\>\s*\(:\s*\w\+\s*\)\='
 
  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
  if last_line =~ pat0 || last_line =~ pat1
    let indent0 = 1
  endif
 
  " Indent after if/else/for/case/always/initial/specify/fork blocks
 
  if (last_line =~ pat2 ||  last_line =~ pat3 || last_line =~ ':\s*$') && (last_line !~ ';\s*$')
    let indent1 = 1
 
  elseif  last_line =~ pat5 || last_line =~ pat6
    let indent2 = 1
 
  elseif last_line =~ '^\s*`\<\(ifdef\|else\|ifndef\)\>'
    return ind + offset
  endif
 
  let sum1 = indent0 + indent1 + indent2
 
  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
  if (curr_line =~ pat7 || curr_line =~ '^\s*{')
    let de_indent0 = 1
  endif
 
  if (sum1 == 0) && (last_line !~ '^\s*end\|\<begin\>') &&
        \ (curr_line =~ ')\s*;\s*$') && 
        \ (last_line =~ ',\s*$' || last_line =~ '\w\s*$\|]\s*$\|)\s*$')
    return ind - offset
  endif
 
  let sum2 = de_indent0 
 
  if indent0 + indent1 + sum2 == 0
    let lnum2 = s:prevnonblanknoncomment(lnum - 1)
    let last_line2_ind = s:comment_ind(lnum2)
    let last_line2 = s:removecommment(getline(lnum2),last_line2_ind)
 
    if ((last_line2 !~ pat0 && last_line2 !~ pat1) && 
          \ (last_line2 =~ pat2 || last_line2 =~ pat3 || last_line2 =~ ':\s*$') &&
          \ (last_line =~ ';\s*$'))
      return indent(lnum2)
    endif
  endif
  
 
  " Return the indention
  if (indent0 == 0 && indent1 == 1 && de_indent0 == 1)
    return ind
  elseif  sum1 > 0
    return ind + offset
  elseif  sum2 > 0
    return ind - offset
  else
    return ind
  endif 
 
endfunction
 
" vim:sw=2
"***********************Verilg & SystemVerilog Configure Ends*******************
 
"********************************************************************************
"Mark Sets
"********************************************************************************
let mapleader = "."
 
"***********************Mark Sets End*******************************************
 
 
"********************************************************************************
"Personal configuration is End
"********************************************************************************
 
 
 
 
 
 
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif

Debian下VIM的安装和配置的更多相关文章

  1. linux下vim的安装与配置(centos)

    1.vim的安装 #yum search vim   //查看vim相关软件信息 #yum install -y vim*  //在线安装vim 2.vim的配置 (1)~/.viminfo 在vim ...

  2. ubuntu16.04下vim的安装与配置

    一.安装vim 使用命令 $ sudo apt-get install vim  来安装vim,安装后的vim需要进行一些配置,不然使用起来会有些不方便,比如不会自动缩进. 二.配置vim 使用命令  ...

  3. Ubuntu下VIM的安装及其配置——Linux篇

    一.Ubuntu系统默认内置: 实际上ubuntu默认没有安装老版本的vi,只装了vim.vi是vim.tiny(vim的最小化版本,不含 GUI,并且仅含有一小部分功能,并且默认与vi兼容.此软件包 ...

  4. Linux下vim的安装及配置

    目录 一.vim的下载 二.vim的基本知识 三.vim的基本配置 四.vim与外部文件的复制粘贴 一.vim的下载 Ubuntu系统,输入命令: sudo apt install vim Cento ...

  5. CentOS 6.5 下HeartBeat的安装与配置

    CentOS 6.5 下HeartBeat的安装与配置 参考网站: http://wenku.baidu.com/link?url=BvqJatdx1m12PLil-7YA1zkM0yUOEO8OnN ...

  6. linux下svn的安装与配置

    ---恢复内容开始--- linux下svn的安装与配置 Linux发行版本:CentOS6.5 1.安装subversion sudo yum -y install subversion 2.创建s ...

  7. nginx在Centos7.5下源码安装和配置

    安装nginx 安装nginx依赖包 yum install -y pcre-devel zlib-devel openssl-devel wget gcc tree vim 进入目录/root/se ...

  8. Centos7 下的SVN安装与配置

    Centos7 下的SVN安装与配置 1.关闭防火墙 临时关闭防火墙 systemctl stop firewalld 永久防火墙开机自关闭 systemctl disable firewalld 临 ...

  9. linux下redis的安装及配置启动

    linux下redis的安装及配置启动 标签: redisnosql 2014-10-24 14:04 19732人阅读 评论(0) 收藏 举报  分类: 数据与性能(41)  wget http:/ ...

随机推荐

  1. Struts入门学习(一)

    刚开始学习框架的时候感觉很简单,都是用到javaEE的相关框架,自己就想研究源码,但是学了很久之后毫无头绪,所以还是扎扎实实学好Struts毕竟框架做起来要比自己写javaEE要简单,下面我们就来一步 ...

  2. Docker 安装完启动服务报错

    [root@lh- ~]# docker images Cannot connect to the Docker daemon. Is the docker daemon running on thi ...

  3. 深度探索C++对象模型之C++对象模型笔记

    0.菜鸟觉得,在看这本书的时候最好切换角色,把自己的思维转换成编译器开发者,去考虑问题,这样会容易理解些.(当然这样很难,就想着自己要解决什么样的问题好了) 1.在C++中,类的数据成员有两种:静态和 ...

  4. Openjudge-计算概论(A)-求平均年龄

    描述: 班上有学生若干名,给出每名学生的年龄(整数),求班上所有学生的平均年龄,保留到小数点后两位. 输入第一行有一个整数n(1<= n <= 100),表示学生的人数.其后n行每行有1个 ...

  5. 用 rebar 来构建、编译、测试、发布 Erlang 应用程序

    转自:http://dhq.me/build-compile-eunit-release-erlang-application-with-rebar rebar 是一个遵循 Erlang/OTP 原则 ...

  6. PHP CURL 代理发送数据

    $session = curl_init($request); curl_setopt ($session, CURLOPT_PROXY, $proxy); curl_setopt ($session ...

  7. JavaScript实现本地数据简单存取以及Json数据存取

    1.判断本地存储是否可用: if(window.localStorage) { // localStorge可用 }else { // localStorge不可用 } 2.存储数据: // 获取本地 ...

  8. this is it

    hello everyone: 我是光哥.以后就在这里更新博客了.^_^ 主要更新一些学习记录,再加点别的吧 2015-8-21 许昌 申庄 吃饭去了,下午2:27的车去郑州!

  9. mongoDB1--什么是mongoDB

    mongodb1.mongodb与其它nosql数据库的区别我们之前应该接触过redis或者memcached,他们属于key-value数据库,他们运用哈希算法关联起来,能够达到快速的查询目的.而m ...

  10. 用Jedis获取redis连接(集群和非集群状态下)

    第一:非集群状态下 非集群状态下用Jedis获取redis连接,得到Jedis对象即可,一共有两种: 1.利用Jedis构造器,仅限用于测试,在实际项目中肯定是用JedisPool. Jedis(St ...