Skip to content

Commit

Permalink
Updated plugins and added vim-markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
amix committed Feb 4, 2018
1 parent 2514de5 commit 8eeefe8
Show file tree
Hide file tree
Showing 111 changed files with 6,618 additions and 918 deletions.
12 changes: 10 additions & 2 deletions sources_non_forked/ctrlp.vim/autoload/ctrlp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,14 @@ fu! ctrlp#addfile(ch, file)
cal s:BuildPrompt(1)
endf

fu! s:safe_printf(format, ...)
try
retu call('printf', [a:format] + a:000)
cat
retu a:format
endt
endf

fu! s:UserCmd(lscmd)
let [path, lscmd] = [s:dyncwd, a:lscmd]
let do_ign =
Expand All @@ -461,9 +469,9 @@ fu! s:UserCmd(lscmd)
let g:ctrlp_allfiles = []
let s:job = job_start([&shell, &shellcmdflag, printf(lscmd, path)], {'callback': 'ctrlp#addfile'})
elsei has('patch-7.4-597') && !(has('win32') || has('win64'))
let g:ctrlp_allfiles = systemlist(printf(lscmd, path))
let g:ctrlp_allfiles = systemlist(s:safe_printf(lscmd, path))
el
let g:ctrlp_allfiles = split(system(printf(lscmd, path)), "\n")
let g:ctrlp_allfiles = split(system(s:safe_printf(lscmd, path)), "\n")
en
if exists('+ssl') && exists('ssl')
let &ssl = ssl
Expand Down
8 changes: 5 additions & 3 deletions sources_non_forked/ctrlp.vim/autoload/ctrlp/line.vim
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ fu! ctrlp#line#accept(dict)
let bufnr = str2nr(get(info, 1))
if bufnr
cal ctrlp#acceptfile(mode, bufnr, get(info, 2))
let @/ = input
call search(input, 'c')
call histadd("search", input)
if !empty(input)
let @/ = input
call search(input, 'c')
call histadd("search", input)
en
en
endf

Expand Down
4 changes: 2 additions & 2 deletions sources_non_forked/lightline.vim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ landscape is my colorscheme, which is a high-contrast cui-supported colorscheme,
+ [vim-airline](https://github.com/vim-airline/vim-airline) is a nice plugin, but it uses too much functions of other plugins, which should be done by users in `.vimrc`.

## Spirit of this plugin
+ Minimalism. The core script is very small to achive enough functions as a statusline plugin.
+ Minimalism. The core script is very small to achieve enough functions as a statusline plugin.
+ Configurability. You can create your own component and easily add to the statusline and the tabline.
+ Orthogonality. The plugin does not rely on the implementation of other plugins. Such plugin crossing settings should be configured by users.

Expand Down Expand Up @@ -110,7 +110,7 @@ if !has('gui_running')
endif
```

Your statusline appears to work correctly? If yes, great, thanks for choosing lightline.vim! If no, please file a issue report to the [issue tracker](https://github.com/itchyny/lightline.vim/issues).
Your statusline appears to work correctly? If yes, great, thanks for choosing lightline.vim! If no, please file an issue report to the [issue tracker](https://github.com/itchyny/lightline.vim/issues).

By the way, `-- INSERT --` is unnecessary anymore because the mode information is displayed in the statusline.
![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/13.png)
Expand Down
20 changes: 10 additions & 10 deletions sources_non_forked/lightline.vim/autoload/lightline.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" Filename: autoload/lightline.vim
" Author: itchyny
" License: MIT License
" Last Change: 2017/11/11 13:29:26.
" Last Change: 2017/12/31 15:55:00.
" =============================================================================

let s:save_cpo = &cpo
Expand Down Expand Up @@ -84,20 +84,20 @@ endfunction

let s:_lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'filename', 'modified' ] ],
\ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ 'left': [['mode', 'paste'], ['readonly', 'filename', 'modified']],
\ 'right': [['lineinfo'], ['percent'], ['fileformat', 'fileencoding', 'filetype']]
\ },
\ 'inactive': {
\ 'left': [ [ 'filename' ] ],
\ 'right': [ [ 'lineinfo' ], [ 'percent' ] ]
\ 'left': [['filename']],
\ 'right': [['lineinfo'], ['percent']]
\ },
\ 'tabline': {
\ 'left': [ [ 'tabs' ] ],
\ 'right': [ [ 'close' ] ]
\ 'left': [['tabs']],
\ 'right': [['close']]
\ },
\ 'tab': {
\ 'active': [ 'tabnum', 'filename', 'modified' ],
\ 'inactive': [ 'tabnum', 'filename', 'modified' ]
\ 'active': ['tabnum', 'filename', 'modified'],
\ 'inactive': ['tabnum', 'filename', 'modified']
\ },
\ 'component': {
\ 'mode': '%{lightline#mode()}',
Expand Down Expand Up @@ -295,7 +295,7 @@ function! lightline#highlight(...) abort
endfunction

function! s:subseparator(components, subseparator, expanded) abort
let [a, c, f, v, u ] = [ a:components, s:lightline.component, s:lightline.component_function, s:lightline.component_visible_condition, s:lightline.component_function_visible_condition ]
let [a, c, f, v, u] = [a:components, s:lightline.component, s:lightline.component_function, s:lightline.component_visible_condition, s:lightline.component_function_visible_condition]
let xs = map(range(len(a:components)), 'a:expanded[v:val] ? "1" :
\ has_key(f, a[v:val]) ? (has_key(u, a[v:val]) ? "(".u[a[v:val]].")" : (exists("*".f[a[v:val]]) ? "" : "exists(\"*".f[a[v:val]]."\")&&").f[a[v:val]]."()!=#\"\"") :
\ has_key(v, a[v:val]) ? "(".v[a[v:val]].")" : has_key(c, a[v:val]) ? "1" : "0"')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
" =============================================================================
" Filename: autoload/lightline/colorscheme/deus.vim
" Author: nikersify
" License: MIT License
" Last Change: 2018/01/24 13:26:00
" =============================================================================

let s:term_red = 204
let s:term_green = 114
let s:term_yellow = 180
let s:term_blue = 39
let s:term_purple = 170
let s:term_white = 145
let s:term_black = 235
let s:term_grey = 236

let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}

let s:p.normal.left = [ [ '#292c33', '#98c379', s:term_black, s:term_green, 'bold' ], [ '#98c379', '#292c33', s:term_green, s:term_black ] ]
let s:p.normal.right = [ [ '#292c33', '#98c379', s:term_black, s:term_green ], [ '#abb2bf', '#3e4452', s:term_white, s:term_grey ], [ '#98c379', '#292c33', s:term_green, s:term_black ] ]
let s:p.inactive.right = [ [ '#292c33', '#61afef', s:term_black, s:term_blue], [ '#abb2bf', '#3e4452', s:term_white, s:term_grey ] ]
let s:p.inactive.left = s:p.inactive.right[1:]
" her
let s:p.insert.left = [ [ '#292c33', '#61afef', s:term_black, s:term_blue, 'bold' ], [ '#61afef', '#292c33', s:term_blue, s:term_black ] ]
let s:p.insert.right = [ [ '#292c33', '#61afef', s:term_black, s:term_blue ], [ '#ABB2BF', '#3E4452', s:term_white, s:term_grey ], [ '#61afef', '#292c33', s:term_blue, s:term_black ] ]
let s:p.replace.left = [ [ '#292c33', '#e06c75', s:term_black, s:term_red, 'bold' ], [ '#e06c75', '#292c33', s:term_red, s:term_black ] ]
let s:p.replace.right = [ [ '#292c33', '#e06c75', s:term_black, s:term_red, 'bold' ], s:p.normal.right[1], [ '#e06c75', '#292c33', s:term_red, s:term_black ] ]
let s:p.visual.left = [ [ '#292c33', '#c678dd', s:term_black, s:term_purple, 'bold' ], [ '#c678dd', '#292c33', s:term_purple, s:term_black ] ]
let s:p.visual.right = [ [ '#292c33', '#c678dd', s:term_black, s:term_purple, 'bold' ], s:p.normal.right[1], [ '#c678dd', '#292c33', s:term_purple, s:term_black ] ]
let s:p.normal.middle = [ [ '#abb2bf', '#292c33', s:term_white, s:term_black ] ]
let s:p.insert.middle = s:p.normal.middle
let s:p.replace.middle = s:p.normal.middle
let s:p.tabline.left = [ s:p.normal.left[1] ]
let s:p.tabline.tabsel = [ s:p.normal.left[0] ]
let s:p.tabline.middle = s:p.normal.middle
let s:p.tabline.right = [ s:p.normal.left[1] ]
let s:p.normal.error = [ [ '#292c33', '#e06c75', s:term_black, s:term_red ] ]
let s:p.normal.warning = [ [ '#292c33', '#e5c07b', s:term_black, s:term_yellow ] ]

let g:lightline#colorscheme#deus#palette = lightline#colorscheme#fill(s:p)
11 changes: 6 additions & 5 deletions sources_non_forked/lightline.vim/doc/lightline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Version: 0.1
Author: itchyny (https://github.com/itchyny)
License: MIT License
Repository: https://github.com/itchyny/lightline.vim
Last Change: 2017/11/18 20:07:05.
Last Change: 2017/12/24 21:34:15.

CONTENTS *lightline-contents*

Expand All @@ -29,7 +29,7 @@ The *lightline* plugin is a light and configurable statusline/tabline for Vim.
SPIRIT *lightline-spirit*

Minimalism
The core script is very small to achive enough functions as a
The core script is very small to achieve enough functions as a
statusline plugin.

Configurability
Expand Down Expand Up @@ -157,7 +157,7 @@ OPTIONS *lightline-option*
A dictionary to store the visible conditions of the function
components. Each expression should correspond to the condition
each component is not empty. This configuration is used to
control the visibility of the subseparators. You can use this
control the visibility of the sub-separators. You can use this
configuration to reduce the number of function calls for
performance improvement by setting the value 1 (to tell lightline
that the component is always visible).
Expand Down Expand Up @@ -229,7 +229,8 @@ OPTIONS *lightline-option*
Currently, wombat, solarized, powerline, jellybeans, Tomorrow,
Tomorrow_Night, Tomorrow_Night_Blue, Tomorrow_Night_Eighties,
PaperColor, seoul256, landscape, one, Dracula, darcula,
molokai, materia, material, OldHope, nord and 16color are available.
molokai, materia, material, OldHope, nord, 16color and deus
are available.
The default value is:
>
let g:lightline.colorscheme = 'default'
Expand Down Expand Up @@ -1200,7 +1201,7 @@ Problem 11: *lightline-problem-11*
Problem 12: *lightline-problem-12*
How to make the plus sign red like |powerline|?

Use the following setings.
Use the following settings.
>
let g:lightline = {
\ 'component': {
Expand Down
2 changes: 1 addition & 1 deletion sources_non_forked/nerdtree/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Installation

git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree

Then reload Vim, run `:helptags ~/.vim/bundle/nerdtree/doc/`, and check out `:help NERDTree.txt`.
Then reload Vim, run `:helptags ~/.vim/bundle/nerdtree/doc/` or `:Helptags`, and check out `:help NERDTree.txt`.


#### [apt-vim](https://github.com/egalpin/apt-vim)
Expand Down
62 changes: 25 additions & 37 deletions sources_non_forked/nerdtree/autoload/nerdtree/ui_glue.vim
Original file line number Diff line number Diff line change
Expand Up @@ -261,62 +261,50 @@ function! s:displayHelp()
call b:NERDTree.ui.centerView()
endfunction

" FUNCTION: s:findAndRevealPath(path) {{{1
function! s:findAndRevealPath(path)
let l:path = a:path
" FUNCTION: s:findAndRevealPath(pathStr) {{{1
function! s:findAndRevealPath(pathStr)
let l:pathStr = !empty(a:pathStr) ? a:pathStr : expand('%:p')

if empty(l:path)
let l:path = expand('%:p')
if empty(l:pathStr)
call nerdtree#echoWarning('no file for the current buffer')
return
endif

try
let p = g:NERDTreePath.New(l:path)
let l:pathObj = g:NERDTreePath.New(l:pathStr)
catch /^NERDTree.InvalidArgumentsError/
call nerdtree#echo("no file for the current buffer")
call nerdtree#echoWarning('invalid path')
return
endtry

if p.isUnixHiddenPath()
let showhidden=g:NERDTreeShowHidden
let g:NERDTreeShowHidden = 1
endif

if !g:NERDTree.ExistsForTab()
try
let cwd = g:NERDTreePath.New(getcwd())
let l:cwd = g:NERDTreePath.New(getcwd())
catch /^NERDTree.InvalidArgumentsError/
call nerdtree#echo("current directory does not exist.")
let cwd = p.getParent()
call nerdtree#echo('current directory does not exist.')
let l:cwd = l:pathObj.getParent()
endtry

if p.isUnder(cwd)
call g:NERDTreeCreator.CreateTabTree(cwd.str())
if l:pathObj.isUnder(l:cwd)
call g:NERDTreeCreator.CreateTabTree(l:cwd.str())
else
call g:NERDTreeCreator.CreateTabTree(p.getParent().str())
call g:NERDTreeCreator.CreateTabTree(l:pathObj.getParent().str())
endif
else
if !p.isUnder(g:NERDTreeFileNode.GetRootForTab().path)
if !g:NERDTree.IsOpen()
call g:NERDTreeCreator.ToggleTabTree('')
else
call g:NERDTree.CursorToTreeWin()
endif
call b:NERDTree.ui.setShowHidden(g:NERDTreeShowHidden)
call s:chRoot(g:NERDTreeDirNode.New(p.getParent(), b:NERDTree))
else
if !g:NERDTree.IsOpen()
call g:NERDTreeCreator.ToggleTabTree("")
endif
NERDTreeFocus

if !l:pathObj.isUnder(b:NERDTree.root.path)
call s:chRoot(g:NERDTreeDirNode.New(l:pathObj.getParent(), b:NERDTree))
endif
endif
call g:NERDTree.CursorToTreeWin()
let node = b:NERDTree.root.reveal(p)
call b:NERDTree.render()
call node.putCursorHere(1,0)

if p.isUnixHiddenFile()
let g:NERDTreeShowHidden = showhidden
if l:pathObj.isHiddenUnder(b:NERDTree.root.path)
call b:NERDTree.ui.setShowHidden(1)
endif

let l:node = b:NERDTree.root.reveal(l:pathObj)
call b:NERDTree.render()
call l:node.putCursorHere(1, 0)
endfunction

"FUNCTION: s:handleLeftClick() {{{1
Expand Down
42 changes: 20 additions & 22 deletions sources_non_forked/nerdtree/doc/NERDTree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,20 @@ The following features and functionality are provided by the NERD tree:
Changes made to one tree are reflected in both as they are actually the
same buffer.

If only one other NERD tree exists, that tree is automatically mirrored. If
more than one exists, the script will ask which tree to mirror.
If only one other NERD tree exists, that tree is automatically mirrored.
If more than one exists, the script will ask which tree to mirror.

:NERDTreeClose *:NERDTreeClose*
Close the NERD tree in this tab.

:NERDTreeFind *:NERDTreeFind*
Find the current file in the tree.
:NERDTreeFind [<path>] *:NERDTreeFind*
Without the optional argument, find and reveal the file for the active
buffer in the NERDTree window. With the <path> argument, find and
reveal the specified path.

If no tree exists and the current file is under vim's CWD, then init a
tree at the CWD and reveal the file. Otherwise init a tree in the current
file's directory.

In any case, the current file is revealed and the cursor is placed on it.
Focus will be shifted to the NERDTree window, and the cursor will be
placed on the tree node for the determined path. If a NERDTree for the
current tab does not exist, a new one will be initialized.

:NERDTreeCWD *:NERDTreeCWD*
Change tree root to current directory. If no NERD tree exists for this
Expand Down Expand Up @@ -996,17 +996,16 @@ Other examples: >

------------------------------------------------------------------------------
*'NERDTreeStatusline'*
Values: Any valid statusline setting.
Default: %{b:NERDTree.root.path.strForOS(0)}
Values: Any valid |'statusline'| setting.
Default: %{exists('b:NERDTree')?b:NERDTree.root.path.str():''}

Tells the script what to use as the |'statusline'| setting for NERD tree
windows.
Defines the value for the |'statusline'| setting in NERDTree windows.

Note that the statusline is set using |:let-&| not |:set| so escaping spaces
isn't necessary.
Note: The setting is actually applied using |:let-&|, not |:set|, so
escaping spaces is not necessary.

Setting this option to -1 will will deactivate it so that your global
statusline setting is used instead.
|'statusline'| setting is used.

------------------------------------------------------------------------------
*'NERDTreeWinPos'*
Expand Down Expand Up @@ -1128,13 +1127,12 @@ NERDTreeAddKeyMap({options}) *NERDTreeAddKeyMap()*
Additionally, a "scope" argument may be supplied. This constrains the
mapping so that it is only activated if the cursor is on a certain object.
That object is then passed into the handling method. Possible values are:
"FileNode" - a file node
"DirNode" - a directory node
"Node" - a file or directory node
"Bookmark" - A bookmark
"all" - the keymap is not constrained to any scope (default). When
thei is used, the handling function is not passed any arguments.

"FileNode" .... a file node
"DirNode" ..... a directory node
"Node" ........ a file node OR a directory node
"Bookmark" .... a bookmark
"all" ......... global scope; handler receives no arguments (default)

Example: >
call NERDTreeAddKeyMap({
Expand Down
2 changes: 2 additions & 0 deletions sources_non_forked/nerdtree/lib/nerdtree/flag_set.vim
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ function! s:FlagSet.renderToString()

return '[' . flagstring . ']'
endfunction

" vim: set sw=4 sts=4 et fdm=marker:
Loading

0 comments on commit 8eeefe8

Please sign in to comment.