Commits

Ian Liu Rodrigues committed f4191e4

Move hg2o.vim into plugin/ folder

Comments (0)

Files changed (2)

hg2o.vim

-" hg2o.vim - Vim Hg2O is a wrapper for Mercurial version control system.
-" Maintainer:  Ian Liu Rodrigues
-" Version:     0.1
-
-" Init {{{1
-if exists('g:loaded_hg2o') || &cp
-  finish
-endif
-
-let g:loaded_hg2o = 1
-let s:HG = 'hg'
-" }}}1
-" Utils {{{1
-fun! s:throw(msg)
-  let v:errmsg = 'Hg2O: ' . a:msg
-  throw v:errmsg
-endf
-
-" Returns the root dir of current buffer's HG repo
-fun! s:root() abort
-  if exists('b:hg_root') && b:hg_root !=# ''
-    return b:hg_root
-  endif
-  let b:hg_root = system(s:HG . ' root')
-  if v:shell_error == 0
-    return b:hg_root
-  endif
-  call s:throw('not a mercurial repository: ' . expand('%:p'))
-endf
-" }}}1
-" Hg {{{1
-com! -nargs=? -complete=customlist,s:HgComplete Hg :execute s:Hg(<q-args>)
-
-fun! s:Hg(cmd) abort
-  exe '!' . s:HG . ' ' . a:cmd
-endf
-
-fun! s:HgComplete(A, L, P) abort
-  let items = system(s:HG . ' debugcomplete '. a:A)
-  if v:shell_error == 0
-    return split(items, '\n')
-  endif
-endf
-" }}}1
-" Hgstatus {{{1
-com! -nargs=0 Hgstatus :execute s:Hgstatus()
-
-fun! s:Hgstatus()
-  pedit hg2o://status
-  wincmd P
-  silent execute '0read !'.s:HG.' status'
-  setlocal nomodifiable nomodified readonly ft=hgstatus
-endf
-" }}}1
+" hg2o.vim - Vim Hg2O is a wrapper for Mercurial version control system.
+" Maintainer:  Ian Liu Rodrigues
+" Version:     0.1
+
+" Init {{{1
+if exists('g:loaded_hg2o') || &cp
+  finish
+endif
+
+let g:loaded_hg2o = 1
+let s:HG = 'hg'
+" }}}1
+" Utils {{{1
+fun! s:throw(msg)
+  let v:errmsg = 'Hg2O: ' . a:msg
+  throw v:errmsg
+endf
+
+" Returns the root dir of current buffer's HG repo
+fun! s:root() abort
+  if exists('b:hg_root') && b:hg_root !=# ''
+    return b:hg_root
+  endif
+  let b:hg_root = system(s:HG . ' root')
+  if v:shell_error == 0
+    return b:hg_root
+  endif
+  call s:throw('not a mercurial repository: ' . expand('%:p'))
+endf
+" }}}1
+" Hg {{{1
+com! -nargs=? -complete=customlist,s:HgComplete Hg :execute s:Hg(<q-args>)
+
+fun! s:Hg(cmd) abort
+  exe '!' . s:HG . ' ' . a:cmd
+endf
+
+fun! s:HgComplete(A, L, P) abort
+  let items = system(s:HG . ' debugcomplete '. a:A)
+  if v:shell_error == 0
+    return split(items, '\n')
+  endif
+endf
+" }}}1
+" Hgstatus {{{1
+com! -nargs=0 Hgstatus :execute s:Hgstatus()
+
+fun! s:Hgstatus()
+  pedit hg2o://status
+  wincmd P
+  silent execute '0read !'.s:HG.' status'
+  setlocal nomodifiable nomodified readonly ft=hgstatus
+endf
+" }}}1
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.