Explorar o código

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 %!s(int64=6) %!d(string=hai) anos
pai
achega
f417d9ec5a
Modificáronse 3 ficheiros con 14 adicións e 9 borrados
  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) {
             function output(matches, best_match, common) {
                 # list or return the desired directory
                 # list or return the desired directory
                 if( list ) {
                 if( list ) {
+                    if( common ) {
+                        printf "%-10s %s\n", "common:", common > "/dev/stderr"
+                    }
                     cmd = "sort -n >&2"
                     cmd = "sort -n >&2"
                     for( x in matches ) {
                     for( x in matches ) {
                         if( matches[x] ) {
                         if( matches[x] ) {
                             printf "%-10s %s\n", matches[x], x | cmd
                             printf "%-10s %s\n", matches[x], x | cmd
                         }
                         }
                     }
                     }
-                    if( common ) {
-                        printf "%-10s %s\n", "common:", common > "/dev/stderr"
-                    }
                 } else {
                 } else {
                     if( common ) best_match = common
                     if( common ) best_match = common
                     print best_match
                     print best_match
@@ -199,15 +199,22 @@ _z() {
                 # prefer case sensitive
                 # prefer case sensitive
                 if( best_match ) {
                 if( best_match ) {
                     output(matches, best_match, common(matches))
                     output(matches, best_match, common(matches))
+                    exit
                 } else if( ibest_match ) {
                 } else if( ibest_match ) {
                     output(imatches, ibest_match, common(imatches))
                     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
     fi
 }
 }
 
 

+ 1 - 0
vim/plugins.vim

@@ -55,6 +55,7 @@ Plug 'ajh17/VimCompletesMe'
 
 
 " Coding Language Support {{{
 " Coding Language Support {{{
 Plug 'vim-pandoc/vim-pandoc-syntax'
 Plug 'vim-pandoc/vim-pandoc-syntax'
+Plug 'vim-scripts/yaml.vim'
 Plug 'vimperator/vimperator.vim'
 Plug 'vimperator/vimperator.vim'
 if v:version > 700 || (v:version == 700 && has('patch175'))
 if v:version > 700 || (v:version == 700 && has('patch175'))
   Plug 'scrooloose/syntastic'
   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.
 " `.conf` and `.ini` files should not force text to the next line.
 au BufEnter *.conf,*.ini setlocal textwidth=0
 au BufEnter *.conf,*.ini setlocal textwidth=0
 
 
-" RiotJS Tag support
-au BufNewFile,BufRead *.tag setlocal ft=javascript
-
 " Add spelling to markdown files
 " Add spelling to markdown files
 au FileType markdown setlocal spell
 au FileType markdown setlocal spell