summaryrefslogtreecommitdiffstats
path: root/autoload/dart.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-04-14 13:17:26 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-04-14 13:17:26 +0200
commit14dc82fc4e6c0c08078f97a24a6c1639c1cc5113 (patch)
treedea8d2398a9377a0eee7786776e3cd420ce1ee89 /autoload/dart.vim
parente86e0ad36ef9501acbc3e8c63a1d4fab104e47cb (diff)
downloadvim-polyglot-14dc82fc4e6c0c08078f97a24a6c1639c1cc5113.tar.gz
vim-polyglot-14dc82fc4e6c0c08078f97a24a6c1639c1cc5113.zip
Update
Diffstat (limited to 'autoload/dart.vim')
-rw-r--r--autoload/dart.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/autoload/dart.vim b/autoload/dart.vim
index 3776da4e..367e54e4 100644
--- a/autoload/dart.vim
+++ b/autoload/dart.vim
@@ -86,7 +86,7 @@ endfunction
" If the path cannot be resolved, or is not a package: uri, returns the
" original.
function! dart#resolveUri(uri) abort
- if a:uri !~ 'package:'
+ if a:uri !~# 'package:'
return a:uri
endif
let package_name = substitute(a:uri, 'package:\(\w\+\)\/.*', '\1', '')
@@ -118,20 +118,20 @@ function! s:PackageMap() abort
let lines = readfile(dot_packages)
let map = {}
for line in lines
- if line =~ '\s*#'
+ if line =~# '\s*#'
continue
endif
let package = substitute(line, ':.*$', '', '')
let lib_dir = substitute(line, '^[^:]*:', '', '')
- if lib_dir =~ 'file:/'
+ if lib_dir =~# 'file:/'
let lib_dir = substitute(lib_dir, 'file://', '', '')
- if lib_dir =~ '/[A-Z]:/'
+ if lib_dir =~# '/[A-Z]:/'
let lib_dir = lib_dir[1:]
endif
else
let lib_dir = resolve(dot_packages_dir.'/'.lib_dir)
endif
- if lib_dir =~ '/$'
+ if lib_dir =~# '/$'
let lib_dir = lib_dir[:len(lib_dir) - 2]
endif
let map[package] = lib_dir
@@ -141,7 +141,7 @@ endfunction
" Toggle whether dartfmt is run on save or not.
function! dart#ToggleFormatOnSave() abort
- if get(g:, "dart_format_on_save", 0)
+ if get(g:, 'dart_format_on_save', 0)
let g:dart_format_on_save = 0
return
endif