-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding contents, thanks to all the people who created all the stuff i…
… am using
- Loading branch information
Ragib Morshed
committed
May 27, 2015
1 parent
18219fe
commit 1b0bd8b
Showing
13 changed files
with
6,583 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
'NERDChristmasTree' NERD_tree.txt /*'NERDChristmasTree'* | ||
'NERDTreeAutoCenter' NERD_tree.txt /*'NERDTreeAutoCenter'* | ||
'NERDTreeAutoCenterThreshold' NERD_tree.txt /*'NERDTreeAutoCenterThreshold'* | ||
'NERDTreeBookmarksFile' NERD_tree.txt /*'NERDTreeBookmarksFile'* | ||
'NERDTreeCaseSensitiveSort' NERD_tree.txt /*'NERDTreeCaseSensitiveSort'* | ||
'NERDTreeChDirMode' NERD_tree.txt /*'NERDTreeChDirMode'* | ||
'NERDTreeHighlightCursorline' NERD_tree.txt /*'NERDTreeHighlightCursorline'* | ||
'NERDTreeHijackNetrw' NERD_tree.txt /*'NERDTreeHijackNetrw'* | ||
'NERDTreeIgnore' NERD_tree.txt /*'NERDTreeIgnore'* | ||
'NERDTreeMouseMode' NERD_tree.txt /*'NERDTreeMouseMode'* | ||
'NERDTreeQuitOnOpen' NERD_tree.txt /*'NERDTreeQuitOnOpen'* | ||
'NERDTreeShowBookmarks' NERD_tree.txt /*'NERDTreeShowBookmarks'* | ||
'NERDTreeShowFiles' NERD_tree.txt /*'NERDTreeShowFiles'* | ||
'NERDTreeShowHidden' NERD_tree.txt /*'NERDTreeShowHidden'* | ||
'NERDTreeShowLineNumbers' NERD_tree.txt /*'NERDTreeShowLineNumbers'* | ||
'NERDTreeSortOrder' NERD_tree.txt /*'NERDTreeSortOrder'* | ||
'NERDTreeStatusline' NERD_tree.txt /*'NERDTreeStatusline'* | ||
'NERDTreeWinPos' NERD_tree.txt /*'NERDTreeWinPos'* | ||
'NERDTreeWinSize' NERD_tree.txt /*'NERDTreeWinSize'* | ||
'loaded_nerd_tree' NERD_tree.txt /*'loaded_nerd_tree'* | ||
:NERDTree NERD_tree.txt /*:NERDTree* | ||
:NERDTreeClose NERD_tree.txt /*:NERDTreeClose* | ||
:NERDTreeFind NERD_tree.txt /*:NERDTreeFind* | ||
:NERDTreeFromBookmark NERD_tree.txt /*:NERDTreeFromBookmark* | ||
:NERDTreeMirror NERD_tree.txt /*:NERDTreeMirror* | ||
:NERDTreeToggle NERD_tree.txt /*:NERDTreeToggle* | ||
NERDTree NERD_tree.txt /*NERDTree* | ||
NERDTree-? NERD_tree.txt /*NERDTree-?* | ||
NERDTree-A NERD_tree.txt /*NERDTree-A* | ||
NERDTree-B NERD_tree.txt /*NERDTree-B* | ||
NERDTree-C NERD_tree.txt /*NERDTree-C* | ||
NERDTree-C-J NERD_tree.txt /*NERDTree-C-J* | ||
NERDTree-C-K NERD_tree.txt /*NERDTree-C-K* | ||
NERDTree-D NERD_tree.txt /*NERDTree-D* | ||
NERDTree-F NERD_tree.txt /*NERDTree-F* | ||
NERDTree-I NERD_tree.txt /*NERDTree-I* | ||
NERDTree-J NERD_tree.txt /*NERDTree-J* | ||
NERDTree-K NERD_tree.txt /*NERDTree-K* | ||
NERDTree-O NERD_tree.txt /*NERDTree-O* | ||
NERDTree-P NERD_tree.txt /*NERDTree-P* | ||
NERDTree-R NERD_tree.txt /*NERDTree-R* | ||
NERDTree-T NERD_tree.txt /*NERDTree-T* | ||
NERDTree-U NERD_tree.txt /*NERDTree-U* | ||
NERDTree-X NERD_tree.txt /*NERDTree-X* | ||
NERDTree-cd NERD_tree.txt /*NERDTree-cd* | ||
NERDTree-contents NERD_tree.txt /*NERDTree-contents* | ||
NERDTree-e NERD_tree.txt /*NERDTree-e* | ||
NERDTree-f NERD_tree.txt /*NERDTree-f* | ||
NERDTree-gi NERD_tree.txt /*NERDTree-gi* | ||
NERDTree-go NERD_tree.txt /*NERDTree-go* | ||
NERDTree-gs NERD_tree.txt /*NERDTree-gs* | ||
NERDTree-i NERD_tree.txt /*NERDTree-i* | ||
NERDTree-m NERD_tree.txt /*NERDTree-m* | ||
NERDTree-o NERD_tree.txt /*NERDTree-o* | ||
NERDTree-p NERD_tree.txt /*NERDTree-p* | ||
NERDTree-q NERD_tree.txt /*NERDTree-q* | ||
NERDTree-r NERD_tree.txt /*NERDTree-r* | ||
NERDTree-s NERD_tree.txt /*NERDTree-s* | ||
NERDTree-t NERD_tree.txt /*NERDTree-t* | ||
NERDTree-u NERD_tree.txt /*NERDTree-u* | ||
NERDTree-x NERD_tree.txt /*NERDTree-x* | ||
NERDTreeAPI NERD_tree.txt /*NERDTreeAPI* | ||
NERDTreeAbout NERD_tree.txt /*NERDTreeAbout* | ||
NERDTreeAddKeyMap() NERD_tree.txt /*NERDTreeAddKeyMap()* | ||
NERDTreeAddMenuItem() NERD_tree.txt /*NERDTreeAddMenuItem()* | ||
NERDTreeAddMenuSeparator() NERD_tree.txt /*NERDTreeAddMenuSeparator()* | ||
NERDTreeAddSubmenu() NERD_tree.txt /*NERDTreeAddSubmenu()* | ||
NERDTreeBookmarkCommands NERD_tree.txt /*NERDTreeBookmarkCommands* | ||
NERDTreeBookmarkTable NERD_tree.txt /*NERDTreeBookmarkTable* | ||
NERDTreeBookmarks NERD_tree.txt /*NERDTreeBookmarks* | ||
NERDTreeChangelog NERD_tree.txt /*NERDTreeChangelog* | ||
NERDTreeCredits NERD_tree.txt /*NERDTreeCredits* | ||
NERDTreeFunctionality NERD_tree.txt /*NERDTreeFunctionality* | ||
NERDTreeGlobalCommands NERD_tree.txt /*NERDTreeGlobalCommands* | ||
NERDTreeInvalidBookmarks NERD_tree.txt /*NERDTreeInvalidBookmarks* | ||
NERDTreeKeymapAPI NERD_tree.txt /*NERDTreeKeymapAPI* | ||
NERDTreeLicense NERD_tree.txt /*NERDTreeLicense* | ||
NERDTreeMappings NERD_tree.txt /*NERDTreeMappings* | ||
NERDTreeMenu NERD_tree.txt /*NERDTreeMenu* | ||
NERDTreeMenuAPI NERD_tree.txt /*NERDTreeMenuAPI* | ||
NERDTreeOptionDetails NERD_tree.txt /*NERDTreeOptionDetails* | ||
NERDTreeOptionSummary NERD_tree.txt /*NERDTreeOptionSummary* | ||
NERDTreeOptions NERD_tree.txt /*NERDTreeOptions* | ||
NERDTreeRender() NERD_tree.txt /*NERDTreeRender()* | ||
NERD_tree.txt NERD_tree.txt /*NERD_tree.txt* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
" ============================================================================ | ||
" File: exec_menuitem.vim | ||
" Description: plugin for NERD Tree that provides an execute file menu item | ||
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com> | ||
" Last Change: 22 July, 2009 | ||
" License: This program is free software. It comes without any warranty, | ||
" to the extent permitted by applicable law. You can redistribute | ||
" it and/or modify it under the terms of the Do What The Fuck You | ||
" Want To Public License, Version 2, as published by Sam Hocevar. | ||
" See http://sam.zoy.org/wtfpl/COPYING for more details. | ||
" | ||
" ============================================================================ | ||
if exists("g:loaded_nerdtree_exec_menuitem") | ||
finish | ||
endif | ||
let g:loaded_nerdtree_exec_menuitem = 1 | ||
|
||
call NERDTreeAddMenuItem({ | ||
\ 'text': '(!)Execute file', | ||
\ 'shortcut': '!', | ||
\ 'callback': 'NERDTreeExecFile', | ||
\ 'isActiveCallback': 'NERDTreeExecFileActive' }) | ||
|
||
function! NERDTreeExecFileActive() | ||
let node = g:NERDTreeFileNode.GetSelected() | ||
return !node.path.isDirectory && node.path.isExecutable | ||
endfunction | ||
|
||
function! NERDTreeExecFile() | ||
let treenode = g:NERDTreeFileNode.GetSelected() | ||
echo "==========================================================\n" | ||
echo "Complete the command to execute (add arguments etc):\n" | ||
let cmd = treenode.path.str({'escape': 1}) | ||
let cmd = input(':!', cmd . ' ') | ||
|
||
if cmd != '' | ||
exec ':!' . cmd | ||
else | ||
echo "Aborted" | ||
endif | ||
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
" ============================================================================ | ||
" File: fs_menu.vim | ||
" Description: plugin for the NERD Tree that provides a file system menu | ||
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com> | ||
" Last Change: 17 July, 2009 | ||
" License: This program is free software. It comes without any warranty, | ||
" to the extent permitted by applicable law. You can redistribute | ||
" it and/or modify it under the terms of the Do What The Fuck You | ||
" Want To Public License, Version 2, as published by Sam Hocevar. | ||
" See http://sam.zoy.org/wtfpl/COPYING for more details. | ||
" | ||
" ============================================================================ | ||
if exists("g:loaded_nerdtree_fs_menu") | ||
finish | ||
endif | ||
let g:loaded_nerdtree_fs_menu = 1 | ||
|
||
call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'}) | ||
call NERDTreeAddMenuItem({'text': '(m)ove the curent node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'}) | ||
call NERDTreeAddMenuItem({'text': '(d)elete the curent node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'}) | ||
if g:NERDTreePath.CopyingSupported() | ||
call NERDTreeAddMenuItem({'text': '(c)copy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'}) | ||
endif | ||
|
||
"FUNCTION: s:echo(msg){{{1 | ||
function! s:echo(msg) | ||
redraw | ||
echomsg "NERDTree: " . a:msg | ||
endfunction | ||
|
||
"FUNCTION: s:echoWarning(msg){{{1 | ||
function! s:echoWarning(msg) | ||
echohl warningmsg | ||
call s:echo(a:msg) | ||
echohl normal | ||
endfunction | ||
|
||
"FUNCTION: s:promptToDelBuffer(bufnum, msg){{{1 | ||
"prints out the given msg and, if the user responds by pushing 'y' then the | ||
"buffer with the given bufnum is deleted | ||
" | ||
"Args: | ||
"bufnum: the buffer that may be deleted | ||
"msg: a message that will be echoed to the user asking them if they wish to | ||
" del the buffer | ||
function! s:promptToDelBuffer(bufnum, msg) | ||
echo a:msg | ||
if nr2char(getchar()) ==# 'y' | ||
exec "silent bdelete! " . a:bufnum | ||
endif | ||
endfunction | ||
|
||
"FUNCTION: NERDTreeAddNode(){{{1 | ||
function! NERDTreeAddNode() | ||
let curDirNode = g:NERDTreeDirNode.GetSelected() | ||
|
||
let newNodeName = input("Add a childnode\n". | ||
\ "==========================================================\n". | ||
\ "Enter the dir/file name to be created. Dirs end with a '/'\n" . | ||
\ "", curDirNode.path.str({'format': 'Glob'}) . g:NERDTreePath.Slash()) | ||
|
||
if newNodeName ==# '' | ||
call s:echo("Node Creation Aborted.") | ||
return | ||
endif | ||
|
||
try | ||
let newPath = g:NERDTreePath.Create(newNodeName) | ||
let parentNode = b:NERDTreeRoot.findNode(newPath.getParent()) | ||
|
||
let newTreeNode = g:NERDTreeFileNode.New(newPath) | ||
if parentNode.isOpen || !empty(parentNode.children) | ||
call parentNode.addChild(newTreeNode, 1) | ||
call NERDTreeRender() | ||
call newTreeNode.putCursorHere(1, 0) | ||
endif | ||
catch /^NERDTree/ | ||
call s:echoWarning("Node Not Created.") | ||
endtry | ||
endfunction | ||
|
||
"FUNCTION: NERDTreeMoveNode(){{{1 | ||
function! NERDTreeMoveNode() | ||
let curNode = g:NERDTreeFileNode.GetSelected() | ||
let newNodePath = input("Rename the current node\n" . | ||
\ "==========================================================\n" . | ||
\ "Enter the new path for the node: \n" . | ||
\ "", curNode.path.str()) | ||
|
||
if newNodePath ==# '' | ||
call s:echo("Node Renaming Aborted.") | ||
return | ||
endif | ||
|
||
try | ||
let bufnum = bufnr(curNode.path.str()) | ||
|
||
call curNode.rename(newNodePath) | ||
call NERDTreeRender() | ||
|
||
"if the node is open in a buffer, ask the user if they want to | ||
"close that buffer | ||
if bufnum != -1 | ||
let prompt = "\nNode renamed.\n\nThe old file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)" | ||
call s:promptToDelBuffer(bufnum, prompt) | ||
endif | ||
|
||
call curNode.putCursorHere(1, 0) | ||
|
||
redraw | ||
catch /^NERDTree/ | ||
call s:echoWarning("Node Not Renamed.") | ||
endtry | ||
endfunction | ||
|
||
" FUNCTION: NERDTreeDeleteNode() {{{1 | ||
function! NERDTreeDeleteNode() | ||
let currentNode = g:NERDTreeFileNode.GetSelected() | ||
let confirmed = 0 | ||
|
||
if currentNode.path.isDirectory | ||
let choice =input("Delete the current node\n" . | ||
\ "==========================================================\n" . | ||
\ "STOP! To delete this entire directory, type 'yes'\n" . | ||
\ "" . currentNode.path.str() . ": ") | ||
let confirmed = choice ==# 'yes' | ||
else | ||
echo "Delete the current node\n" . | ||
\ "==========================================================\n". | ||
\ "Are you sure you wish to delete the node:\n" . | ||
\ "" . currentNode.path.str() . " (yN):" | ||
let choice = nr2char(getchar()) | ||
let confirmed = choice ==# 'y' | ||
endif | ||
|
||
|
||
if confirmed | ||
try | ||
call currentNode.delete() | ||
call NERDTreeRender() | ||
|
||
"if the node is open in a buffer, ask the user if they want to | ||
"close that buffer | ||
let bufnum = bufnr(currentNode.path.str()) | ||
if buflisted(bufnum) | ||
let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)" | ||
call s:promptToDelBuffer(bufnum, prompt) | ||
endif | ||
|
||
redraw | ||
catch /^NERDTree/ | ||
call s:echoWarning("Could not remove node") | ||
endtry | ||
else | ||
call s:echo("delete aborted") | ||
endif | ||
|
||
endfunction | ||
|
||
" FUNCTION: NERDTreeCopyNode() {{{1 | ||
function! NERDTreeCopyNode() | ||
let currentNode = g:NERDTreeFileNode.GetSelected() | ||
let newNodePath = input("Copy the current node\n" . | ||
\ "==========================================================\n" . | ||
\ "Enter the new path to copy the node to: \n" . | ||
\ "", currentNode.path.str()) | ||
|
||
if newNodePath != "" | ||
"strip trailing slash | ||
let newNodePath = substitute(newNodePath, '\/$', '', '') | ||
|
||
let confirmed = 1 | ||
if currentNode.path.copyingWillOverwrite(newNodePath) | ||
call s:echo("Warning: copying may overwrite files! Continue? (yN)") | ||
let choice = nr2char(getchar()) | ||
let confirmed = choice ==# 'y' | ||
endif | ||
|
||
if confirmed | ||
try | ||
let newNode = currentNode.copy(newNodePath) | ||
call NERDTreeRender() | ||
call newNode.putCursorHere(0, 0) | ||
catch /^NERDTree/ | ||
call s:echoWarning("Could not copy node") | ||
endtry | ||
endif | ||
else | ||
call s:echo("Copy aborted.") | ||
endif | ||
redraw | ||
endfunction | ||
|
||
" vim: set sw=4 sts=4 et fdm=marker: |
Oops, something went wrong.