diff options
author | Akshay <[email protected]> | 2021-04-11 11:44:18 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-04-11 11:44:18 +0100 |
commit | bb0c74e9226c3f7d6f5f3129c551265abf0ac9c1 (patch) | |
tree | d1c45f0ff8362b69175a5736b704eafce412d170 /plugin | |
parent | 433b4a53fac2c86f68403fbbfd7801525d21eb19 (diff) |
add quickfix title name to statusline
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/maps.vim | 2 | ||||
-rw-r--r-- | plugin/statusline.vim | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/plugin/maps.vim b/plugin/maps.vim index 188cb69..f3c5f76 100644 --- a/plugin/maps.vim +++ b/plugin/maps.vim | |||
@@ -7,13 +7,11 @@ map <leader>cc :w !xclip -sel c<CR> | |||
7 | 7 | ||
8 | " normal | 8 | " normal |
9 | nnoremap <Leader>o : only<cr> | 9 | nnoremap <Leader>o : only<cr> |
10 | " nnoremap <Leader>l : Lines<cr> | ||
11 | nnoremap <Leader>b : Buffers<cr> | 10 | nnoremap <Leader>b : Buffers<cr> |
12 | nnoremap <Leader>n : bnext<cr> | 11 | nnoremap <Leader>n : bnext<cr> |
13 | nnoremap <Leader>p : bprev<cr> | 12 | nnoremap <Leader>p : bprev<cr> |
14 | nnoremap <Leader>z : FZF<cr> | 13 | nnoremap <Leader>z : FZF<cr> |
15 | nnoremap <Leader>l : Lines<cr> | 14 | nnoremap <Leader>l : Lines<cr> |
16 | nnoremap <Leader>w : MtaJumpToOtherTag<cr> | ||
17 | nnoremap <Leader>t : call GetTabber()<cr> | 15 | nnoremap <Leader>t : call GetTabber()<cr> |
18 | nnoremap <Leader><ESC> : nohlsearch<cr> | 16 | nnoremap <Leader><ESC> : nohlsearch<cr> |
19 | nnoremap <C-l> :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l> | 17 | nnoremap <C-l> :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l> |
diff --git a/plugin/statusline.vim b/plugin/statusline.vim index 3e1c069..0a1f6c0 100644 --- a/plugin/statusline.vim +++ b/plugin/statusline.vim | |||
@@ -81,6 +81,15 @@ function! Filepath() abort | |||
81 | endif | 81 | endif |
82 | endfunction | 82 | endfunction |
83 | 83 | ||
84 | function! QuickFixStatus() abort | ||
85 | let l:qfl=getqflist() | ||
86 | let l:qftitle = getqflist({'title' : 0}).title | ||
87 | if len(qfl) != 0 | ||
88 | return l:qftitle | ||
89 | else | ||
90 | return '' | ||
91 | endfunction | ||
92 | |||
84 | function! LinterStatus() abort | 93 | function! LinterStatus() abort |
85 | let sl = '' | 94 | let sl = '' |
86 | let msgs = [] | 95 | let msgs = [] |
@@ -113,6 +122,8 @@ function! StatusLine(mode) abort | |||
113 | let l:line.='%7*%{StatuslineGit()}' | 122 | let l:line.='%7*%{StatuslineGit()}' |
114 | let l:line.='%<' | 123 | let l:line.='%<' |
115 | let l:line.=Filepath() | 124 | let l:line.=Filepath() |
125 | let l:line.='%5*' | ||
126 | let l:line.=QuickFixStatus() | ||
116 | 127 | ||
117 | let l:line.='%5*' | 128 | let l:line.='%5*' |
118 | let l:line.=' %{ReadOnly()} %w%*' | 129 | let l:line.=' %{ReadOnly()} %w%*' |