Skip to content

Commit

Permalink
lazy load for ultisnips
Browse files Browse the repository at this point in the history
  • Loading branch information
voyeg3r committed Jan 20, 2018
1 parent 0691682 commit fdda3b4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 12 deletions.
14 changes: 13 additions & 1 deletion nvim/init.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
" nvim init file ~/.config/nvim/init.vim
" Last Change: 2018 jan 19 08:54
" Last Change: 2018 jan 20 13:37
" vim: ff=unix ai et ts=4
" Reference: http://sergioaraujo.pbworks.com/w/page/15864094/vimrc
"
Expand Down Expand Up @@ -1015,6 +1015,18 @@ let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-j>"
let g:UltiSnipsJumpBackwardTrigger="<c-k>"

" lazy load for ultisnips
" https://medium.com/@saaguero/improving-performance-in-vim-9b33598c8eaf
inoremap <silent> <C-j> <C-r>=LoadUltiSnips()<cr>
" This function only runs when UltiSnips is not loaded
function! LoadUltiSnips()
let l:curpos = getcurpos()
execute plug#load('ultisnips')
call cursor(l:curpos[1], l:curpos[2])
call UltiSnips#ExpandSnippet()
return ""
endfunction

if exists(":python3")
let g:_uspy=":python3"
let g:ultisnipsusepythonversion = 3
Expand Down
20 changes: 10 additions & 10 deletions vim/snips/markdown.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ priority 2
# in your vimrc like --> let g:snip_author="Author Name"
snippet 'sig|head' "my signature" r
`!v repeat(nr2char(96),3)` ${1:markdown}
File: ${1:`!p snip.rv = snip.fn`}
Created: `!v strftime("%c")`
File: ${1:`!p snip.rv = snip.fn`}
Created: `!v strftime("%c")`
Last Change: `!v strftime("%c")`
Author: `!v g:snips_author`
Site: `!v g:snips_site`
e-mail: `!v g:snips_email`
Twitter: `!v g:snips_twitter`
Github: `!v g:snips_github`
Author: `!v g:snips_author`
Site: `!v g:snips_site`
e-mail: `!v g:snips_email`
Twitter: `!v g:snips_twitter`
Github: `!v g:snips_github`
`!v repeat(nr2char(96),3)`
${0}
endsnippet
Expand All @@ -37,15 +37,15 @@ ${0: ctrl-j}
endsnippet

snippet 'in(line)?' "code inline" r
`!v nr2char(96)`${0:${VISUAL:type here ..}}`!v nr2char(96)`
`!v nr2char(96)`${0:${VISUAL:type here}}`!v nr2char(96)`
endsnippet

snippet bold "*markdown bold*" w
*${1:text}*
*${1:${VISUAL:text}}*
endsnippet

snippet 'italic?' "md italic" r
_${1:text}_
_${1:${VISUAL:text}}_
endsnippet

snippet modeline "modeline para markdown" w
Expand Down
15 changes: 14 additions & 1 deletion vim/wiki/dicasfirefox.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File: dicasfirefox.md - Last Change: qua 03 jan 2018 15:28:38 -03
# File: dicasfirefox.md - Last Change: 2018 jan 19 13:41
```
Criado: Ter 04/Jan/2011 hs 20:21
```
Expand Down Expand Up @@ -147,6 +147,19 @@ Identify as chrome
# Suspend firefox inactive tabs
+ https://addons.mozilla.org/en-US/firefox/addon/tab-suspender-tab-unloader/

# New speeding tab feature
Tab Warming: How Firefox Will Improve Web Browsing Experience? How To Get It Now?

How to enable tab warming in Firefox?

As you know, tab warming is currently under development. So, you can test the
same in Firefox Nightly builds.

Go to about:config. Accept the warning message if it appears.
Search for a preference called:

browser.tabs.remote.warmup.enabled

# Make firefox speak English
[us language pack](https://addons.mozilla.org/en-US/firefox/addon/english-us-language-pack/)
# Select All Text When You Click on the URL Bar
Expand Down

0 comments on commit fdda3b4

Please sign in to comment.