Prechádzať zdrojové kódy

Update plugins, add yaml, remove riot from vim

The riot syntax plugin is moved out of the base dotfiles, since it is
not seen on many machines. The yaml plugin is promoted as one which does
see more use.
cinaeco 5 rokov pred
rodič
commit
f417d9ec5a
3 zmenil súbory, kde vykonal 14 pridanie a 9 odobranie
  1. 13 6
      shell/common/z.sh
  2. 1 0
      vim/plugins.vim
  3. 0 3
      vim/settings/filetype-specifics.vim

+ 13 - 6
shell/common/z.sh

@@ -147,15 +147,15 @@ _z() {
             function output(matches, best_match, common) {
                 # list or return the desired directory
                 if( list ) {
+                    if( common ) {
+                        printf "%-10s %s\n", "common:", common > "/dev/stderr"
+                    }
                     cmd = "sort -n >&2"
                     for( x in matches ) {
                         if( matches[x] ) {
                             printf "%-10s %s\n", matches[x], x | cmd
                         }
                     }
-                    if( common ) {
-                        printf "%-10s %s\n", "common:", common > "/dev/stderr"
-                    }
                 } else {
                     if( common ) best_match = common
                     print best_match
@@ -199,15 +199,22 @@ _z() {
                 # prefer case sensitive
                 if( best_match ) {
                     output(matches, best_match, common(matches))
+                    exit
                 } else if( ibest_match ) {
                     output(imatches, ibest_match, common(imatches))
+                    exit
                 }
+                exit(1)
             }
         ')"
 
-        [ $? -eq 0 ] && [ "$cd" ] && {
-          if [ "$echo" ]; then echo "$cd"; else builtin cd "$cd"; fi
-        }
+        if [ "$?" -eq 0 ]; then
+          if [ "$cd" ]; then
+            if [ "$echo" ]; then echo "$cd"; else builtin cd "$cd"; fi
+          fi
+        else
+          return $?
+        fi
     fi
 }
 

+ 1 - 0
vim/plugins.vim

@@ -55,6 +55,7 @@ Plug 'ajh17/VimCompletesMe'
 
 " Coding Language Support {{{
 Plug 'vim-pandoc/vim-pandoc-syntax'
+Plug 'vim-scripts/yaml.vim'
 Plug 'vimperator/vimperator.vim'
 if v:version > 700 || (v:version == 700 && has('patch175'))
   Plug 'scrooloose/syntastic'

+ 0 - 3
vim/settings/filetype-specifics.vim

@@ -7,8 +7,5 @@ au BufNewFile,BufRead *.yaml,*.yml so ~/.vim/plugged/yaml.vim/colors/yaml.vim
 " `.conf` and `.ini` files should not force text to the next line.
 au BufEnter *.conf,*.ini setlocal textwidth=0
 
-" RiotJS Tag support
-au BufNewFile,BufRead *.tag setlocal ft=javascript
-
 " Add spelling to markdown files
 au FileType markdown setlocal spell