File: mirkwood.vim

package info (click to toggle)
vim-command-t 5.0.2-5-g7147ba9-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 744 kB
  • sloc: ruby: 3,394; ansic: 1,177; makefile: 27; sh: 26; xml: 11
file content (44 lines) | stat: -rw-r--r-- 1,921 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
" Copyright 2010-present Greg Hurrell. All rights reserved.
" Licensed under the terms of the BSD 2-clause license.

" Set up the original implementation Command-T engine, codenamed "mirkwood".
function! commandt#mirkwood#init() abort
  command! CommandTBuffer call commandt#BufferFinder()
  command! CommandTCommand call commandt#CommandFinder()
  command! CommandTHelp call commandt#HelpFinder()
  command! CommandTHistory call commandt#HistoryFinder()
  command! CommandTJump call commandt#JumpFinder()
  command! CommandTLine call commandt#LineFinder()
  command! CommandTMRU call commandt#MRUFinder()
  command! CommandTSearch call commandt#SearchFinder()
  command! CommandTTag call commandt#TagFinder()
  command! -nargs=? -complete=dir CommandT call commandt#FileFinder(<q-args>)
  command! CommandTFlush call commandt#Flush()
  command! CommandTLoad call commandt#Load()

  if !hasmapto('<Plug>(CommandT)') && maparg('<Leader>t', 'n') ==# ''
    nmap <unique> <Leader>t <Plug>(CommandT)
  endif
  nnoremap <silent> <Plug>(CommandT) :CommandT<CR>

  if !hasmapto('<Plug>(CommandTBuffer)') && maparg('<Leader>b', 'n') ==# ''
    nmap <unique> <Leader>b <Plug>(CommandTBuffer)
  endif
  nnoremap <silent> <Plug>(CommandTBuffer) :CommandTBuffer<CR>

  nnoremap <silent> <Plug>(CommandTHelp) :CommandTHelp<CR>
  nnoremap <silent> <Plug>(CommandTHistory) :CommandTHistory<CR>

  if has('jumplist')
    if !hasmapto('<Plug>(CommandTJump)') && maparg('<Leader>j', 'n') ==# ''
      nmap <unique> <Leader>j <Plug>(CommandTJump)
    endif
    nnoremap <silent> <Plug>(CommandTJump) :CommandTJump<CR>
  endif

  nnoremap <silent> <Plug>(CommandTCommand) :CommandTCommand<CR>
  nnoremap <silent> <Plug>(CommandTLine) :CommandTLine<CR>
  nnoremap <silent> <Plug>(CommandTMRU) :CommandTMRU<CR>
  nnoremap <silent> <Plug>(CommandTSearch) :CommandTSearch<CR>
  nnoremap <silent> <Plug>(CommandTTag) :CommandTTag<CR>
endfunction