erc: added carp checker; vimrc: added carp checker and vim-es6

This commit is contained in:
2018-02-25 18:28:31 +01:00
parent f5c392b9aa
commit 068b802807
2 changed files with 28 additions and 1 deletions

26
erc
View File

@@ -12,7 +12,11 @@ meta_commands["blame"] = function()
author = string.match(lines, "author (%a+)") author = string.match(lines, "author (%a+)")
message(author) if author == nil then
message("Not checked in!")
else
message(author)
end
end end
keys["%"] = function() keys["%"] = function()
@@ -35,6 +39,26 @@ keys["!"] = function()
message(result) message(result)
end end
meta_commands["carp"] = function()
file = get_filename()
handle = io.popen("carp --check "..file)
result = handle:read("*a")
handle:close()
if result.len == 0 then return end
if starts(result, "Invalid path") then
message("File not yet saved to disk!")
return
end
split = result:gmatch(":")
if split[0] == file then
move(tonumber(split[1]), tonumber(split[2]))
message(table.concat(table.unpack(split, 3), ":"))
end
end
function get_meta_commands() function get_meta_commands()
res = "" res = ""

3
vimrc
View File

@@ -93,6 +93,7 @@ Bundle 'hellerve/luna-vim'
Bundle 'tikhomirov/vim-glsl' Bundle 'tikhomirov/vim-glsl'
Plugin 'rust-lang/rust.vim' Plugin 'rust-lang/rust.vim'
Plugin 'kchmck/vim-coffee-script' Plugin 'kchmck/vim-coffee-script'
Plugin 'isRuslan/vim-es6'
" Custom bundles " Custom bundles
if filereadable(expand("~/.vim.local/bundles.vim")) if filereadable(expand("~/.vim.local/bundles.vim"))
@@ -636,3 +637,5 @@ if filereadable(expand("~/.vimrc.local"))
endif endif
" }}} " }}}
let g:syntastic_carp_checkers = ['carp']