世界上最伟大的投资就是投资自己的教育

mrj


id 16931


惠赠 投资者 3 days 23 hours 3 minutes 35 seconds 舵主 研究生


  • 零基础玩转 vim 视频教程 #23 buffers 终极管理 & vim-rooter 自动切换目录

    随风老师你好,为什么我的 buffer 只有在 2 个及以上的 tab 页时才展示, 是哪里出现的问题了?打开多个文件都只是在同一个 tab 中, 所以不展示 buffer

    ===========================================================================
    ` .vimrc
    set nocompatible

    set number
    set guitablabel=%-0.40t%M

    " set scrolljump=5 " lines to scroll when cursor leaves screen
    set scrolloff=6 " minimum lines to keep above and below cursor

    " 减少刷新和重画
    set lz

    let html_no_rendering=1

    " Open new split windows to the right/bottom
    " set splitright splitbelow
    set splitright

    set tabstop=2
    set expandtab
    set smarttab
    set shiftwidth=2
    set softtabstop=2

    set autoindent
    set smartindent

    " set gcr=n:blinkon0

    let mapleader = ','

    " 文字过长时断行显示
    set wrap

    " 设置折叠方法
    set fdm=manual

    " 进入编辑模式时按 tab 弹出菜单
    set wildmenu
    set wildmode=list:longest,full

    " 修复 backspace 键的作用
    inoremap
    set whichwrap+=[

    " 设置一行最多 80 个字符
    " set textwidth=80

    " 自动重新读入
    set autoread

    " 备份和缓存
    set nobackup
    set noswapfile
    set nowritebackup

    " 高亮搜索
    set hlsearch
    set incsearch

    " no bell
    set noeb vb t_vb=
    au GUIEnter * set vb t_vb=

    set mouse=a

    " 启动的时候不显示那个援助索马里儿童的提示
    set shortmess=atI

    " 搜索时忽略大小写
    set ignorecase
    set smartcase

    " 设置编码
    set encoding=utf-8
    set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936

    " 设置标题
    set title
    set titlestring=%-25.55F\ %a%r%m titlelen=70"

    " 高亮当前行
    set cursorline

    " 修改 vmirc 后自动生效
    map l :source ~/.vimrc
    autocmd! bufwritepost .vimrc source ~/.vimrc

    " 去掉工具栏
    set go-=T

    " 回到上次编辑的地方
    au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif

    call plug#begin('~/.vim/plugged')
    if filereadable(expand("~/.vim/.vimrc.bundle"))
    source ~/.vim/.vimrc.bundle
    endif
    call plug#end()

    if filereadable(expand("~/.vim/.vimrc.settings"))
    source ~/.vim/.vimrc.settings
    endif

    " colorscheme
    if ! has('gui_running')
    set termguicolors
    set t_Co=256
    endif

    set background=dark

    if has("gui_running")
    set linespace=2
    set guioptions=
    else
    set nocursorline
    endif

    set guifont=Monaco\ Nerd\ Font\ Mono:h12
    colorscheme molokai

    ===========================================================================
    ` .vimrc.settings
    let g:ascii = [
    \ ' # # #####',
    \ ' # # # #',
    \ ' # # # #',
    \ ' # # # #',
    \ ' # # # # #',
    \ ' #### ###### #####',
    ]

    " NerdTree
    map :NERDTreeToggle:NERDTreeMirror
    map e :NERDTreeFind
    let NERDTreeIgnore=['.pyc', '~$', '.swo$', '.swp$', '.git', '.hg', '.svn', '.bzr']
    autocmd vimenter * if ! argc() | NERDTree | endif
    autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
    let NERDTreeWinSize=33
    let NERDTreeQuitOnOpen=0
    let NERDTreeShowHidden=1
    autocmd VimEnter * wincmd l
    autocmd BufNew * wincmd l

    " airline
    let g:airline_theme="molokai"
    " status line
    set laststatus=2

    " jsdoc

    " easy_align
    vnoremap :EasyAlign

    " indent_guides
    let g:indent_guides_auto_colors = 0
    autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=#212121 ctermbg=3
    autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=#404040 ctermbg=4
    set ts=2 sw=2 et
    let g:indent_guides_start_level = 2
    let g:indent_guides_guide_size = 1
    let g:indent_guides_enable_on_vim_startup = 0

    " ack
    if executable('ag')
    let g:ackprg = "ag -H --nocolor --nogroup --column --vimgrep"
    endif
    cnoreabbrev ag Ack
    cnoreabbrev aG Ack
    cnoreabbrev AG Ack
    cnoreabbrev Ag Ack

    " Buffer explorer
    nmap n :BufExplorer
    let g:bufExplorerDefaultHelp=0
    let g:bufExplorerShowRelativePath=1

    "
    " vim-xtabline
    let g:xtabline_settings = get(g:, 'xtabline_settings', {})
    let g:xtabline_settings.map_prefix = 'x'
    let g:xtabline_settings.tabline_modes = ['buffers', 'tabs']
    autocmd vimenter * XTabTheme slate
    autocmd bufenter * XTabTheme slate
    "

    " vim-devicons
    let g:WebDevIconsNerdTreeAfterGlyphPadding = ''
    let g:WebDevIconsNerdTreeGitPluginForceVAlign = 0

    " glyph-palette
    augroup my-glyph-palette
    autocmd! *
    autocmd FileType fern call glyph_palette#apply()
    autocmd FileType nerdtree,startify call glyph_palette#apply()
    augroup END

    "
    " startify
    "
    let g:startify_custom_header = g:ascii + startify#fortune#boxed()

    map o :Startify
    let g:startify_files_number = 15
    let g:startify_lists = [
    \ { 'type': 'files', 'header': [' Files'] },
    \ { 'type': 'bookmarks', 'header': [' Bookmarks'] },
    \ { 'type': 'dir', 'header': [' Current Directory '. getcwd()] },
    \ ]

    let g:startify_bookmarks = [
    \ { 's': '~/.vim/.vimrc.settings' },
    \ { 'b': '~/.vim/.vimrc.bundle' },
    \ { 'v': '~/.vimrc' },
    \ { 'z': '~/.zshrc' },
    \ { 'l': '~/lesson'},
    \ ]

    let g:startify_enable_special = 0

    let g:startify_custom_footer =
    \ ['', " jld", '']

    " ----------------------------------------
    " settings
    " ----------------------------------------
    " copy paste
    vmap "+y
    map ggVG
    cnoremap %% =expand('%:h').'/'

    " edit
    map ew :e %%
    map es :sp %%
    map ev :vsp %%
    map et :tabe %%

    " quit
    map :q
    map q :q

    " tab
    noremap :tabnew split

    " save
    map s :w
    cmap w!! w ! sudo tee >/dev/null %
    inoremap :w
    nnoremap :w

    "
    " 移动
    "
    map j
    map k
    map h
    map l

    " Wrapped lines goes down/up to next row, rather than next line in file.
    nnoremap j gj
    nnoremap k gk

    " Highlight word at cursor without changing position
    nnoremap h *

    nmap ,/ :nohlsearch
    map :1,%s/\s+(\%#)\@!$//g
    map mp :set matchpairs=

    map :! ruby %

    noremap :bn
    noremap :bp

    `

    `

  • 最适合远程工作的 Ruby 编程直播回放视频 1

    你好!方便发下 Ruby 基础教程(第 5 版)pdf 吗!谢谢!
    找了一下没找到,还望大佬助我 mr.j@tom.com

© 汕尾市求知科技有限公司 | Rails365 Gitlab | 知乎 | b 站 | csdn

粤公网安备 44152102000088号粤公网安备 44152102000088号 | 粤ICP备19038915号

Top