mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-04 15:07:23 +01:00
Merge branch 'master' into jenipapo
This commit is contained in:
218
vim/UltiSnips/javascript-jasmine.snippets
Normal file
218
vim/UltiSnips/javascript-jasmine.snippets
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
priority -50
|
||||||
|
|
||||||
|
# JavaScript versions -- from the TextMate bundle + some additions
|
||||||
|
# for jasmine-jquery matchers
|
||||||
|
#
|
||||||
|
|
||||||
|
snippet des "Describe (js)" b
|
||||||
|
describe('${1:description}', function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet it "it (js)" b
|
||||||
|
it('${1:description}', function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet bef "before each (js)" b
|
||||||
|
beforeEach(function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet aft "after each (js)" b
|
||||||
|
afterEach(function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet befa "before all (js)" b
|
||||||
|
beforeAll(function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet afta "after all (js)" b
|
||||||
|
afterAll(function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet any "any (js)" b
|
||||||
|
jasmine.any($1)
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet anyt "anything (js)" b
|
||||||
|
jasmine.anything()
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet objc "object containing (js)" b
|
||||||
|
jasmine.objectContaining({
|
||||||
|
${VISUAL}$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet arrc "array containing (js)" b
|
||||||
|
jasmine.arrayContaining([${1:value1}]);
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet strm "string matching (js)" b
|
||||||
|
jasmine.stringMatching("${1:matcher}")
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ru "runs (js)" b
|
||||||
|
runs(function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet wa "waits (js)" b
|
||||||
|
waits($1);
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ex "expect (js)" b
|
||||||
|
expect(${1:target})$0;
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ee "expect to equal (js)" b
|
||||||
|
expect(${1:target}).toEqual(${2:value});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet el "expect to be less than (js)" b
|
||||||
|
expect(${1:target}).toBeLessThan(${2:value});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet eg "expect to be greater than (js)" b
|
||||||
|
expect(${1:target}).toBeGreaterThan(${2:value});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet eb "expect to be (js)" b
|
||||||
|
expect(${1:target}).toBe(${2:value});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet em "expect to match (js)" b
|
||||||
|
expect(${1:target}).toMatch(${2:pattern});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet eha "expect to have attribute (js)" b
|
||||||
|
expect(${1:target}).toHaveAttr('${2:attr}'${3:, '${4:value}'});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet et "expect to be truthy (js)" b
|
||||||
|
expect(${1:target}).toBeTruthy();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ef "expect to be falsy (js)" b
|
||||||
|
expect(${1:target}).toBeFalsy();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ed "expect to be defined (js)" b
|
||||||
|
expect(${1:target}).toBeDefined();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet eud "expect to be defined (js)" b
|
||||||
|
expect(${1:target}).toBeUndefined();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet en "expect to be null (js)" b
|
||||||
|
expect(${1:target}).toBeNull();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ec "expect to contain (js)" b
|
||||||
|
expect(${1:target}).toContain(${2:value});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ev "expect to be visible (js)" b
|
||||||
|
expect(${1:target}).toBeVisible();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet eh "expect to be hidden (js)" b
|
||||||
|
expect(${1:target}).toBeHidden();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notx "expect not (js)" b
|
||||||
|
expect(${1:target}).not$0;
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet note "expect not to equal (js)" b
|
||||||
|
expect(${1:target}).not.toEqual(${2:value});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notl "expect to not be less than (js)" b
|
||||||
|
expect(${1:target}).not.toBeLessThan(${2:value});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notg "expect to not be greater than (js)" b
|
||||||
|
expect(${1:target})..not.toBeGreaterThan(${2:value});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notm "expect not to match (js)" b
|
||||||
|
expect(${1:target}).not.toMatch(${2:pattern});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notha "expect to not have attribute (js)" b
|
||||||
|
expect(${1:target}).not.toHaveAttr('${2:attr}'${3:, '${4:value}'});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet nott "expect not to be truthy (js)" b
|
||||||
|
expect(${1:target}).not.toBeTruthy();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notf "expect not to be falsy (js)" b
|
||||||
|
expect(${1:target}).not.toBeFalsy();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notd "expect not to be defined (js)" b
|
||||||
|
expect(${1:target}).not.toBeDefined();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notn "expect not to be null (js)" b
|
||||||
|
expect(${1:target}).not.toBeNull();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notc "expect not to contain (js)" b
|
||||||
|
expect(${1:target}).not.toContain(${2:value});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet notv "expect not to be visible (js)" b
|
||||||
|
expect(${1:target}).not.toBeVisible();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet noth "expect not to be hidden (js)" b
|
||||||
|
expect(${1:target}).not.toBeHidden();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet s "spy on (js)" b
|
||||||
|
spyOn(${1:object}, '${2:method}')$0;
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet sr "spy on and return (js)" b
|
||||||
|
spyOn(${1:object}, '${2:method}').and.returnValue(${3:arguments});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet st "spy on and throw (js)" b
|
||||||
|
spyOn(${1:object}, '${2:method}').and.throwError(${3:exception});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet sct "spy on and call through (js)" b
|
||||||
|
spyOn(${1:object}, '${2:method}').and.callThrough();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet scf "spy on and call fake (js)" b
|
||||||
|
spyOn(${1:object}, '${2:method}').and.callFake(${3:function});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ethbc "expect to have been called (js)" b
|
||||||
|
expect(${1:target}).toHaveBeenCalled();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet nthbc "expect not to have been called (js)" b
|
||||||
|
expect(${1:target}).not.toHaveBeenCalled();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ethbcw "expect to have been called with (js)" b
|
||||||
|
expect(${1:target}).toHaveBeenCalledWith(${2:arguments});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
65
vim/UltiSnips/javascript-node.snippets
Normal file
65
vim/UltiSnips/javascript-node.snippets
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
priority -50
|
||||||
|
|
||||||
|
snippet #! "shebang"
|
||||||
|
#!/usr/bin/env node
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet vreq "assign a CommonJS-style module to a var"
|
||||||
|
var ${0:${1/(.+\/)*(\w+)(-|\b|$)(\..+$)?/\u$2/g}} = require('${1}');
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ex "module.exports"
|
||||||
|
module.exports = ${1};
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet hcs "http.createServer"
|
||||||
|
http.createServer(${1}).listen(${2});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ncs "net.createServer"
|
||||||
|
net.createServer(function(${1:socket}){
|
||||||
|
${1}.on('data', function(${3:data}){
|
||||||
|
${4}
|
||||||
|
});
|
||||||
|
${1}.on('end', function(){
|
||||||
|
${5}
|
||||||
|
});
|
||||||
|
}).listen(${6:8124});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet pipe "pipe"
|
||||||
|
pipe(${1:stream})${2}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
# Express snippets
|
||||||
|
|
||||||
|
snippet eget "express GET"
|
||||||
|
${1:app}.get('${2}', ${3});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet epost "express POST"
|
||||||
|
${1:app}.post('${2}', ${3});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet eput "express PUT"
|
||||||
|
${1:app}.put('${2}', ${3});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet edelete "express DELETE"
|
||||||
|
${1:app}.delete('${2}', ${3});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
# process snippets
|
||||||
|
|
||||||
|
snippet stdout "stdout"
|
||||||
|
process.stdout
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet stdin "stdin"
|
||||||
|
process.stdin
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet stderr "stderr"
|
||||||
|
process.stderr
|
||||||
|
endsnippet
|
||||||
|
|
||||||
51
vim/UltiSnips/javascript.snippets
Normal file
51
vim/UltiSnips/javascript.snippets
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
priority -30
|
||||||
|
|
||||||
|
# AMD (Asynchronous Module Definition) snippets
|
||||||
|
|
||||||
|
snippet def "define an AMD module"
|
||||||
|
define([
|
||||||
|
'${1:backbone}'
|
||||||
|
], function(
|
||||||
|
${2:Name})
|
||||||
|
) {
|
||||||
|
$0
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
# Jasmine
|
||||||
|
snippet des "Describe (js)" b
|
||||||
|
describe('${1:description}', function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet it "it (js)" b
|
||||||
|
it('${1:description}', function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet bef "before each (js)" b
|
||||||
|
beforeEach(function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet aft "after each (js)" b
|
||||||
|
afterEach(function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet befa "before all (js)" b
|
||||||
|
beforeAll(function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet afta "after all (js)" b
|
||||||
|
afterAll(function() {
|
||||||
|
$0
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
# vim:ft=snippets:
|
||||||
151
vimrc
151
vimrc
@@ -30,6 +30,7 @@ Plug 'SirVer/ultisnips'
|
|||||||
Plug 'honza/vim-snippets'
|
Plug 'honza/vim-snippets'
|
||||||
|
|
||||||
Plug 'scrooloose/syntastic'
|
Plug 'scrooloose/syntastic'
|
||||||
|
Plug 'pmsorhaindo/syntastic-local-eslint.vim'
|
||||||
|
|
||||||
Plug 'tpope/vim-fugitive'
|
Plug 'tpope/vim-fugitive'
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
@@ -48,7 +49,7 @@ Plug 'Raimondi/delimitMate'
|
|||||||
Plug 'pangloss/vim-javascript'
|
Plug 'pangloss/vim-javascript'
|
||||||
Plug 'marijnh/tern_for_vim', { 'do': 'npm install', 'for': 'javascript'}
|
Plug 'marijnh/tern_for_vim', { 'do': 'npm install', 'for': 'javascript'}
|
||||||
Plug 'mustache/vim-mustache-handlebars'
|
Plug 'mustache/vim-mustache-handlebars'
|
||||||
Plug 'mxw/vim-jsx'
|
"Plug 'mxw/vim-jsx'
|
||||||
|
|
||||||
Plug 'shime/vim-livedown'
|
Plug 'shime/vim-livedown'
|
||||||
Plug 'xuhdev/vim-latex-live-preview'
|
Plug 'xuhdev/vim-latex-live-preview'
|
||||||
@@ -262,22 +263,141 @@ nnoremap <leader>sc :CloseSession<CR>
|
|||||||
|
|
||||||
"" syntastic
|
"" syntastic
|
||||||
let g:syntastic_javascript_checkers = ['eslint']
|
let g:syntastic_javascript_checkers = ['eslint']
|
||||||
|
|
||||||
|
let g:syntastic_always_populate_loc_list = 1
|
||||||
|
let g:syntastic_auto_loc_list = 0
|
||||||
let g:syntastic_check_on_open = 1
|
let g:syntastic_check_on_open = 1
|
||||||
|
let g:syntastic_check_on_wq = 0
|
||||||
|
|
||||||
"" lightline
|
"" lightline
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'solarized',
|
\ 'colorscheme': 'solarized',
|
||||||
\ 'active': {
|
\ 'active': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ],
|
||||||
\ [ 'fugitive', 'readonly', 'filename', 'modified' ] ]
|
\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
||||||
\ },
|
\ },
|
||||||
\ 'component': {
|
\ 'component_function': {
|
||||||
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'
|
\ 'fugitive': 'LightLineFugitive',
|
||||||
\ },
|
\ 'filename': 'LightLineFilename',
|
||||||
\ 'component_visible_condition': {
|
\ 'fileformat': 'LightLineFileformat',
|
||||||
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'
|
\ 'filetype': 'LightLineFiletype',
|
||||||
\ }
|
\ 'fileencoding': 'LightLineFileencoding',
|
||||||
\}
|
\ 'mode': 'LightLineMode',
|
||||||
|
\ 'ctrlpmark': 'CtrlPMark',
|
||||||
|
\ },
|
||||||
|
\ 'component_expand': {
|
||||||
|
\ 'syntastic': 'SyntasticStatuslineFlag',
|
||||||
|
\ },
|
||||||
|
\ 'component_type': {
|
||||||
|
\ 'syntastic': 'error',
|
||||||
|
\ },
|
||||||
|
\ 'subseparator': { 'left': '|', 'right': '|' }
|
||||||
|
\ }
|
||||||
|
|
||||||
|
function! LightLineModified()
|
||||||
|
return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineReadonly()
|
||||||
|
return &ft !~? 'help' && &readonly ? 'RO' : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineFilename()
|
||||||
|
let fname = expand('%:t')
|
||||||
|
return fname == 'ControlP' ? g:lightline.ctrlp_item :
|
||||||
|
\ fname == '__Tagbar__' ? g:lightline.fname :
|
||||||
|
\ fname =~ '__Gundo\|NERD_tree' ? '' :
|
||||||
|
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
|
||||||
|
\ &ft == 'unite' ? unite#get_status_string() :
|
||||||
|
\ &ft == 'vimshell' ? vimshell#get_status_string() :
|
||||||
|
\ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
|
||||||
|
\ ('' != fname ? fname : '[No Name]') .
|
||||||
|
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineFugitive()
|
||||||
|
try
|
||||||
|
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||||
|
let mark = '' " edit here for cool mark
|
||||||
|
let _ = fugitive#head()
|
||||||
|
return strlen(_) ? mark._ : ''
|
||||||
|
endif
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
|
return ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineFileformat()
|
||||||
|
return winwidth(0) > 70 ? &fileformat : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineFiletype()
|
||||||
|
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineFileencoding()
|
||||||
|
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineMode()
|
||||||
|
let fname = expand('%:t')
|
||||||
|
return fname == '__Tagbar__' ? 'Tagbar' :
|
||||||
|
\ fname == 'ControlP' ? 'CtrlP' :
|
||||||
|
\ fname == '__Gundo__' ? 'Gundo' :
|
||||||
|
\ fname == '__Gundo_Preview__' ? 'Gundo Preview' :
|
||||||
|
\ fname =~ 'NERD_tree' ? 'NERDTree' :
|
||||||
|
\ &ft == 'unite' ? 'Unite' :
|
||||||
|
\ &ft == 'vimfiler' ? 'VimFiler' :
|
||||||
|
\ &ft == 'vimshell' ? 'VimShell' :
|
||||||
|
\ winwidth(0) > 60 ? lightline#mode() : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! CtrlPMark()
|
||||||
|
if expand('%:t') =~ 'ControlP'
|
||||||
|
call lightline#link('iR'[g:lightline.ctrlp_regex])
|
||||||
|
return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item
|
||||||
|
\ , g:lightline.ctrlp_next], 0)
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let g:ctrlp_status_func = {
|
||||||
|
\ 'main': 'CtrlPStatusFunc_1',
|
||||||
|
\ 'prog': 'CtrlPStatusFunc_2',
|
||||||
|
\ }
|
||||||
|
|
||||||
|
function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked)
|
||||||
|
let g:lightline.ctrlp_regex = a:regex
|
||||||
|
let g:lightline.ctrlp_prev = a:prev
|
||||||
|
let g:lightline.ctrlp_item = a:item
|
||||||
|
let g:lightline.ctrlp_next = a:next
|
||||||
|
return lightline#statusline(0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! CtrlPStatusFunc_2(str)
|
||||||
|
return lightline#statusline(0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let g:tagbar_status_func = 'TagbarStatusFunc'
|
||||||
|
|
||||||
|
function! TagbarStatusFunc(current, sort, fname, ...) abort
|
||||||
|
let g:lightline.fname = a:fname
|
||||||
|
return lightline#statusline(0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
augroup AutoSyntastic
|
||||||
|
autocmd!
|
||||||
|
autocmd BufWritePost *.c,*.cpp call s:syntastic()
|
||||||
|
augroup END
|
||||||
|
function! s:syntastic()
|
||||||
|
SyntasticCheck
|
||||||
|
call lightline#update()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let g:unite_force_overwrite_statusline = 0
|
||||||
|
let g:vimfiler_force_overwrite_statusline = 0
|
||||||
|
let g:vimshell_force_overwrite_statusline = 0
|
||||||
|
|
||||||
"" NERDTree configuration
|
"" NERDTree configuration
|
||||||
nmap <leader>n :NERDTreeToggle<CR>
|
nmap <leader>n :NERDTreeToggle<CR>
|
||||||
@@ -315,7 +435,7 @@ let g:tex_flavor = "latex"
|
|||||||
let g:livepreview_previewer = 'zathura'
|
let g:livepreview_previewer = 'zathura'
|
||||||
|
|
||||||
" JSX
|
" JSX
|
||||||
let g:jsx_ext_required = 0 " Allow JSX in normal JS files
|
" let g:jsx_ext_required = 0 " Allow JSX in normal JS files
|
||||||
|
|
||||||
"
|
"
|
||||||
" Autocmd Rules
|
" Autocmd Rules
|
||||||
@@ -337,6 +457,9 @@ au FileType markdown set wrap wm=2 textwidth=78 nocindent spell
|
|||||||
"" Python
|
"" Python
|
||||||
au FileType python set noexpandtab
|
au FileType python set noexpandtab
|
||||||
|
|
||||||
|
"" JavaScript
|
||||||
|
au FileType javascript map <leader>r <esc>:TernRename<CR>
|
||||||
|
|
||||||
"" Json
|
"" Json
|
||||||
au BufRead,BufNewFile *.json set ft=json
|
au BufRead,BufNewFile *.json set ft=json
|
||||||
|
|
||||||
|
|||||||
4
zprofile
4
zprofile
@@ -1,6 +1,8 @@
|
|||||||
# extend path
|
# extend path
|
||||||
export PATH="$HOME/local/bin:$PATH"
|
export PATH="$HOME/local/bin:$PATH"
|
||||||
|
|
||||||
|
export EDITOR=$(which vim)
|
||||||
|
|
||||||
# nvm
|
# nvm
|
||||||
export NVM_DIR="$HOME/.nvm"
|
export NVM_DIR="$HOME/.nvm"
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
||||||
@@ -9,7 +11,7 @@ export NVM_DIR="$HOME/.nvm"
|
|||||||
# Dist related settings
|
# Dist related settings
|
||||||
########################
|
########################
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
"darwin14.0" )
|
"darwin14.0"|"darwin15.0" )
|
||||||
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
|
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
|
||||||
export MANPATH="$(brew --prefix coreutils)/libexec/gnuman:$MANPATH"
|
export MANPATH="$(brew --prefix coreutils)/libexec/gnuman:$MANPATH"
|
||||||
#eval $(ssh-agent -s)
|
#eval $(ssh-agent -s)
|
||||||
|
|||||||
8
zshrc
8
zshrc
@@ -40,6 +40,14 @@ alias ts='tmux new-session -s'
|
|||||||
alias tl='tmux list-sessions'
|
alias tl='tmux list-sessions'
|
||||||
rl () { $(npm bin)/$* }
|
rl () { $(npm bin)/$* }
|
||||||
|
|
||||||
|
# utt time tracking
|
||||||
|
alias uh='uttr --add hello'
|
||||||
|
alias ust='uttr --add standup'
|
||||||
|
alias ul='uttr --add "lunch**"'
|
||||||
|
alias ue='uttr --edit'
|
||||||
|
alias urw='uttr --report=week'
|
||||||
|
alias urm='uttr --report=month'
|
||||||
|
|
||||||
# colors
|
# colors
|
||||||
autoload -U colors && colors
|
autoload -U colors && colors
|
||||||
alias ls='ls --color=tty'
|
alias ls='ls --color=tty'
|
||||||
|
|||||||
Reference in New Issue
Block a user