tips and tricks for everything but emacs
Forum rules
Share your brain ;)
Share your brain ;)
Re: tips and tricks for everything but emacs
Use vim as your $PAGER:
https://github.com/rkitover/vimpager
Vimpager also comes with vimcat:
https://github.com/ofavre/vimcat
https://github.com/rkitover/vimpager
Vimpager also comes with vimcat:
https://github.com/ofavre/vimcat
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu
Re: tips and tricks for everything but emacs
^ Thank you for the share starck, but I did not know that you used vim, because your profile says geany!
Someone told me that I am delusional, I almost fell off my unicorn.
Re: tips and tricks for everything but emacs
Nice! Thanks for sharing Stark.
difficile est saturam non scribere. nam quis iniquae
tam patiens urbis, tam ferreus, ut teneat se...
tam patiens urbis, tam ferreus, ut teneat se...
Re: tips and tricks for everything but emacs
@simgin I use geany's terminal to open emacs in noX mode and then use emacs's ansi-term to use vim ;)
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu
Re: tips and tricks for everything but emacs
^ wow mate :D
I know some people also use Geany as a poject overview. Hmm, maybe I should try that.
I know some people also use Geany as a poject overview. Hmm, maybe I should try that.
Someone told me that I am delusional, I almost fell off my unicorn.
Re: tips and tricks for everything but emacs
Another one for vim: sessions. I was wondering how to do this after trying Sublime Text, which just continues where you left off. There are plugins which enhance this functionality, but the basic vim way is good enough.
If you are working with multiple files, say you have your window split into two, a few tabs etc, then you can do a :mks (or :mksession) session_name.vim - this will save all the stuff like which files were open and how, any settings and so on. Then, you can open it with vim -S session_name.vim or open vim and do a :source path/to/session_name.vim.
The way I do it now is saving the session files to ~/.sessions, start up vim by itself and source the one I want.
If you are working with multiple files, say you have your window split into two, a few tabs etc, then you can do a :mks (or :mksession) session_name.vim - this will save all the stuff like which files were open and how, any settings and so on. Then, you can open it with vim -S session_name.vim or open vim and do a :source path/to/session_name.vim.
The way I do it now is saving the session files to ~/.sessions, start up vim by itself and source the one I want.
Re: tips and tricks for everything but emacs
I was irritated by the (R) and (TM) in the cpu output of env-info, so I removed them.
Change the awk line in the print-cpu function to remove the (R) and (TM):
Change the awk line in the print-cpu function to remove the (R) and (TM):
Code: Select all
cpu=$(awk -F': ' '/model name/ {gsub("\\(R\\)",""); gsub("\\(TM\\)",""); print $2; exit}' /proc/cpuinfo)
Re: tips and tricks for everything but emacs
hahaha, great :D
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: tips and tricks for everything but emacs
Recently I've been browsing Vimcasts.
If you prefer to watch stuff offline then hopefully you have youtube-dl installed then, you can use this script to get all the 68 episodes !
curl -# http://ix.io/TQx | sh
If you prefer to watch stuff offline then hopefully you have youtube-dl installed then, you can use this script to get all the 68 episodes !
curl -# http://ix.io/TQx | sh
Code: Select all
#!/bin/sh
_print_url()
{
cat << EOF
http://vimcasts.org/episodes/ultisnips-visual-placeholder/
http://vimcasts.org/episodes/ultisnips-python-interpolation/
http://vimcasts.org/episodes/meet-ultisnips/
http://vimcasts.org/episodes/swapping-two-regions-of-text-with-exchange-vim/
http://vimcasts.org/episodes/using-external-filter-commands-to-reformat-html/
http://vimcasts.org/episodes/operating-on-search-matches-using-gn/
http://vimcasts.org/episodes/creating-mappings-that-accept-a-count/
http://vimcasts.org/episodes/creating-repeatable-mappings-with-repeat-vim/
http://vimcasts.org/episodes/comparing-buffers-with-vimdiff/
http://vimcasts.org/episodes/using-vims-paste-mode-with-the-system-paste-command/
http://vimcasts.org/episodes/accessing-the-system-clipboard-from-vim/
http://vimcasts.org/episodes/evaluating-scripts-with-vims-expression-register/
http://vimcasts.org/episodes/simple-calculations-with-vims-expression-register/
http://vimcasts.org/episodes/pasting-from-insert-mode/
http://vimcasts.org/episodes/pasting-from-visual-mode/
http://vimcasts.org/episodes/using-vims-named-registers/
http://vimcasts.org/episodes/meet-the-yank-register/
http://vimcasts.org/episodes/simple-operations-using-the-default-register/
http://vimcasts.org/episodes/an-introduction-to-vspec/
http://vimcasts.org/episodes/enhanced-abbreviations-with-abolish/
http://vimcasts.org/episodes/supercharged-substitution-with-subvert/
http://vimcasts.org/episodes/smart-search-with-subvert/
http://vimcasts.org/episodes/search-for-the-selected-text/
http://vimcasts.org/episodes/project-wide-find-and-replace/
http://vimcasts.org/episodes/search-multiple-files-with-vimgrep/
http://vimcasts.org/episodes/using-argdo-to-change-multiple-files/
http://vimcasts.org/episodes/populating-the-arglist/
http://vimcasts.org/episodes/meet-the-arglist/
http://vimcasts.org/episodes/long-range-line-duplication/
http://vimcasts.org/episodes/profiling-vimscript-performance/
http://vimcasts.org/episodes/writing-a-custom-fold-expression/
http://vimcasts.org/episodes/how-to-fold/
http://vimcasts.org/episodes/vimgolf-prime-numbers/
http://vimcasts.org/episodes/fugitive-vim-exploring-the-history-of-a-git-repository/
http://vimcasts.org/episodes/fugitive-vim-browsing-the-git-object-database/
http://vimcasts.org/episodes/fugitive-vim-resolving-merge-conflicts-with-vimdiff/
http://vimcasts.org/episodes/fugitive-vim-working-with-the-git-index/
http://vimcasts.org/episodes/fugitive-vim---a-complement-to-command-line-git/
http://vimcasts.org/episodes/undo-branching-and-gundo-vim/
http://vimcasts.org/episodes/aligning-text-with-tabular-vim/
http://vimcasts.org/episodes/refining-search-patterns-with-the-command-line-window/
http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/
http://vimcasts.org/episodes/bubbling-text/
http://vimcasts.org/episodes/creating-colorschemes-for-vim/
http://vimcasts.org/episodes/updating-your-vimrc-file-on-the-fly/
http://vimcasts.org/episodes/converting-haml-to-erb-with-vim-macros/
http://vimcasts.org/episodes/selecting-columns-with-visual-block-mode/
http://vimcasts.org/episodes/converting-markdown-to-structured-html-with-a-macro/
http://vimcasts.org/episodes/running-vim-within-irb/
http://vimcasts.org/episodes/spell-checking/
http://vimcasts.org/episodes/formatting-text-with-par/
http://vimcasts.org/episodes/hard-wrapping-text/
http://vimcasts.org/episodes/soft-wrapping-text/
http://vimcasts.org/episodes/the-file-explorer/
http://vimcasts.org/episodes/the-edit-command/
http://vimcasts.org/episodes/cleaning-up-with-vim/
http://vimcasts.org/episodes/modal-editing-undo-redo-and-repeat/
http://vimcasts.org/episodes/using-the-changelist-and-jumplist/
http://vimcasts.org/episodes/creating-the-vimcasts-logo-as-ascii-art/
http://vimcasts.org/episodes/how-to-use-tabs/
http://vimcasts.org/episodes/working-with-tabs/
http://vimcasts.org/episodes/working-with-windows/
http://vimcasts.org/episodes/working-with-buffers/
http://vimcasts.org/episodes/indentation-commands/
http://vimcasts.org/episodes/tidying-whitespace/
http://vimcasts.org/episodes/whitespace-preferences-and-filetypes/
http://vimcasts.org/episodes/tabs-and-spaces/
http://vimcasts.org/episodes/show-invisibles/
EOF
}
_get()
{
while read URL; do
youtube-dl "$URL"
done
}
_print_url | _get
exit 0
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu
- ivanovnegro
- Minister of Truth
- Posts: 5449
- Joined: Wed Oct 17, 2012 11:12 pm
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: tips and tricks for everything but emacs
^ yes and thanks stark
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
Re: tips and tricks for everything but emacs
Thank you Stark. This inspired me to download all the Skeptoid episodes.
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: tips and tricks for everything but emacs
http://www.compciv.org/topics/bash/loops/
is just really good, pretty much all the useful ways to loop stuff in bash, with mainly examples.
and illustrates, you can hit return after do and if's and run it like that.
is just really good, pretty much all the useful ways to loop stuff in bash, with mainly examples.
and illustrates, you can hit return after do and if's and run it like that.
Re: tips and tricks for everything but emacs
^ Thanks wux. Another way to loop a set of numbers without using "seq":
Code: Select all
for x in {2..15}; do
echo $x
done
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: tips and tricks for everything but emacs
So, I accidentally found this the other day - in 'less' - hit 'v' and it opens your $EDITOR with the current file.
I got very confused when I was suddenly editing a log file...
I got very confused when I was suddenly editing a log file...
Re: tips and tricks for everything but emacs
^ That's a great one! Thanks, wux.
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国
Re: tips and tricks for everything but emacs
search last 500 entry at commandlinefu.com, and display each entry voted 5 or more to stdout.
Code: Select all
curl -s www.commandlinefu.com/commands/browse/sort-by-date/json/{0..500..25} | \
jq -r '.[]|select(.votes|tonumber>=5)|"# "+.summary+"\n"+.command+"\n"'
rice no more.
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: tips and tricks for everything but emacs
did you find that one on commandline fu? META
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国
Re: tips and tricks for everything but emacs
^ on reddit actually, earlier this year. Forgot the thread and the original author. :P
rice no more.
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国
Re: tips and tricks for everything but emacs
I'm feeling adventurous, tried nvim and its bag of goods (They even got something like magit, wow and helm/cousel like interface in denite) and tried several autocompletion plugins.
Hit a roadblock in trying to make delimitMate and clang_complete (under deoplete) to play nice with each other, this is my solution:
Edit: fuck, forgot the first then clause
Hit a roadblock in trying to make delimitMate and clang_complete (under deoplete) to play nice with each other, this is my solution:
Code: Select all
" Will put a nice <CR> if within an empty pair (of '{}' for example) after completion.
" like this:
" {
" | (the cursor)
" }
" if you're not using deoplete:
let g:clang_restore_cr_imap =
\ 'imap <silent><CR> (delimitMate#WithinEmptyPair() ? "\<C-R>delimitMate#ExpandReturn()\<CR>" : "\<CR>")'
" if you do:
inoremap <silent><expr><CR> pumvisible() ? deoplete#close_popup()
\ : (delimitMate#WithinEmptyPair() ? "\<C-R>=delimitMate#ExpandReturn()\<CR>" : "\<CR>")
rice no more.