Fix lint warnings: prefer single quoted strings

This commit is contained in:
Caleb Maclennan
2019-12-31 08:50:25 +03:00
parent 8d81510aa6
commit 45e33f2502
20 changed files with 478 additions and 478 deletions

View File

@@ -53,7 +53,7 @@ function! s:KeyMap.bind()
endif
let keymapInvokeString = escape(keymapInvokeString, '\')
let premap = self.key == "<LeftRelease>" ? " <LeftRelease>" : " "
let premap = self.key == '<LeftRelease>' ? ' <LeftRelease>' : ' '
exec 'nnoremap <buffer> <silent> '. self.key . premap . ':call nerdtree#ui_glue#invokeKeyMap("'. keymapInvokeString .'")<cr>'
endfunction
@@ -66,7 +66,7 @@ endfunction
"FUNCTION: KeyMap.invoke() {{{1
"Call the KeyMaps callback function
function! s:KeyMap.invoke(...)
let Callback = type(self.callback) == type(function("tr")) ? self.callback : function(self.callback)
let Callback = type(self.callback) == type(function('tr')) ? self.callback : function(self.callback)
if a:0
call Callback(a:1)
else
@@ -78,11 +78,11 @@ endfunction
"Find a keymapping for a:key and the current scope invoke it.
"
"Scope is determined as follows:
" * if the cursor is on a dir node then "DirNode"
" * if the cursor is on a file node then "FileNode"
" * if the cursor is on a bookmark then "Bookmark"
" * if the cursor is on a dir node then DirNode
" * if the cursor is on a file node then FileNode
" * if the cursor is on a bookmark then Bookmark
"
"If a keymap has the scope of "all" then it will be called if no other keymap
"If a keymap has the scope of 'all' then it will be called if no other keymap
"is found for a:key and the scope.
function! s:KeyMap.Invoke(key)
@@ -100,7 +100,7 @@ function! s:KeyMap.Invoke(key)
"try file node
if !node.path.isDirectory
let km = s:KeyMap.FindFor(a:key, "FileNode")
let km = s:KeyMap.FindFor(a:key, 'FileNode')
if !empty(km)
return km.invoke(node)
endif
@@ -108,14 +108,14 @@ function! s:KeyMap.Invoke(key)
"try dir node
if node.path.isDirectory
let km = s:KeyMap.FindFor(a:key, "DirNode")
let km = s:KeyMap.FindFor(a:key, 'DirNode')
if !empty(km)
return km.invoke(node)
endif
endif
"try generic node
let km = s:KeyMap.FindFor(a:key, "Node")
let km = s:KeyMap.FindFor(a:key, 'Node')
if !empty(km)
return km.invoke(node)
endif
@@ -125,14 +125,14 @@ function! s:KeyMap.Invoke(key)
"try bookmark
let bm = g:NERDTreeBookmark.GetSelected()
if !empty(bm)
let km = s:KeyMap.FindFor(a:key, "Bookmark")
let km = s:KeyMap.FindFor(a:key, 'Bookmark')
if !empty(km)
return km.invoke(bm)
endif
endif
"try all
let km = s:KeyMap.FindFor(a:key, "all")
let km = s:KeyMap.FindFor(a:key, 'all')
if !empty(km)
return km.invoke()
endif