erc: added carp checker; vimrc: added carp checker and vim-es6
This commit is contained in:
24
erc
24
erc
@@ -12,7 +12,11 @@ meta_commands["blame"] = function()
|
||||
|
||||
author = string.match(lines, "author (%a+)")
|
||||
|
||||
if author == nil then
|
||||
message("Not checked in!")
|
||||
else
|
||||
message(author)
|
||||
end
|
||||
end
|
||||
|
||||
keys["%"] = function()
|
||||
@@ -35,6 +39,26 @@ keys["!"] = function()
|
||||
message(result)
|
||||
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()
|
||||
res = ""
|
||||
|
||||
|
3
vimrc
3
vimrc
@@ -93,6 +93,7 @@ Bundle 'hellerve/luna-vim'
|
||||
Bundle 'tikhomirov/vim-glsl'
|
||||
Plugin 'rust-lang/rust.vim'
|
||||
Plugin 'kchmck/vim-coffee-script'
|
||||
Plugin 'isRuslan/vim-es6'
|
||||
|
||||
" Custom bundles
|
||||
if filereadable(expand("~/.vim.local/bundles.vim"))
|
||||
@@ -636,3 +637,5 @@ if filereadable(expand("~/.vimrc.local"))
|
||||
endif
|
||||
|
||||
" }}}
|
||||
|
||||
let g:syntastic_carp_checkers = ['carp']
|
||||
|
Reference in New Issue
Block a user