print a big size icon in terminal, like neofetch does - terminal

when using neofetch, it prints a big, pretty icon in terminal like this on the left:
The big icon consists of several characters like o, +, -. How do I generate an icon like this, so I can print it on the terminal?
Any ideas?

Related

Terminal say command is resulting in > when pasting

in terminal i type say and paste my text i want my mac to say. This results in a greater than sign >. Is there a way to paste my text and get it to work?

Split terminal in Atom

I was curious if it is possible to split the terminal in the Atom text editor?
Yes. Command-k followed by an arrow key to indicate the direction to split the pane. Command-w will close the panes you generated.
For the terminal themselves, the extension term3 supports splitting a terminal window.

How to enable OS X cmd+ctrl+space character menu in Sublime Text 2?

In most OS X apps, even the Terminal which otherwise seems to lack features, cmd+ctrl+space brings up a character menu, where you can type in the name and look for special characters (e.g. greek alphabet). In Sublime Text 2 this does not come up; I just get the bell sound. I tried the trick described Unmap ctrl+space in Sublime Text 3 of mapping the key to the empty command, but that did nothing. Anyone have an idea of how to enable the menu?
The default shortcut for this in ST2, of course, is alt+super+t, but I assume you are wanting to remap this, right?
If so, I looked pretty hard on this one, unfortunately, I couldn't find much to help. It is not a default command, and even if you look inside Packages/Default/Main.sublime-menu, right where the "Special Characters..." line should appear, it is conspicuously absent. Logging all commands in the console using sublime.log_commands(True) shows nothing when I open the special characters window this way.

Vim in Mac OS X Terminal: Move cursor word by word

I have followed the guidance in Is there any way in the OS X Terminal to move the cursor word by word? and now in terminal I can move cursor word by word.
However, in Vim, I am only able to move backward word by word. I cannot move forward word by word, no matter I set \033f to option+cursor-right or shift+cursor-right. The only workaround I figured out is to go to normal mode and click <w> to move to next word. Any idea about how to fix that? Thanks.
w is not a workaround. It's the primary way to move word by word (see also: W, b, B, e, E). What you want is a workaround that won't help you learn Vim at all.
Some may argue that moving around with VIM native keyboard shortcuts is not a workaround, but for me it sure is both very inconvenient and very inefficient. Especially the part where you need to switch between insert mode and normal mode just to move to the next word.
That's why I came up with a solution based on this answer on SuperUser. The idea is to map input provided by the Terminal.app directly in VIM. The answer on SU shows what to put into your vimrc file for the Home/End keys to work as expected.
My tweaked version below includes the Option+arrow (or Alt+arrow) navigation on words. I've tried to mimic the behavior of Terminal's moving around as close as I could get. So pressing Option+Right (Alt+Right) will move the caret to the next character after the word (as opposed to the last character of the word, which is VIMs w native bahavior).
let tp=$TERM_PROGRAM
if tp == 'Apple_Terminal'
:" map Mac OS X Terminal.app
" map Home/End:
:map <ESC>[H <Home>
:map <ESC>[F <End>
" small 'o' letter in <C-o> means no exit from the insert mode
:imap <ESC>[H <C-o><Home>
:imap <ESC>[F <C-o><End>
:cmap <ESC>[H <Home>
:cmap <ESC>[F <End>
" map Option+Left/Option+Right:
" for this to work you must have the bindings in Settings > Keyboard set
" as follows:
" 'option cursor left' to '\033b'
" 'option cursor right' to '\033f'
:map <ESC>f el
:imap <ESC>b <C-o>b
:imap <ESC>f <C-o>el
:cmap <ESC>f el
endif
As a small, but significant bonus you get Home/End navigation without exiting the insert mode. Tested on 10.8.5.
Let me clear a few things up for you. Bash (the shell program running inside the terminal) has the behavior you are used to. (Using Alt+f to move forward by word, and Alt+b to move backward by word.) This was originally done to be like Emacs. You can use the command
set -o vi
to switch to vim behavior. In this mode, you can use Esc to switch to normal mode, and move around like in vim; then press i to go back to insert mode.
So don't be surprised that Vim isn't trying to act like Emacs. The whole power behind vim lies behind these simple motions.

Vim Question Regarding Views

I have been reading a lot of the questions here on vim. I can't locate something that I want to do with vim but I am sure its possible.
I like vim(I am still new at it) using tabs and I have adjusted my vimrc so that H & L keys take me back and forth between tabs.
I was hoping to find a way to be able to use tab commands to open up a tab as output, so that if I am writing something in my case Ruby and I want to test it I could run it and flip to a new tab with the output. Or flip a tab to an interactive console to test code. This is possible?
As an aside is it possible to expand tabs to views so if I had two tabs open say script and output I could :spx or similar and have tabs come to split screen.
You can load the ruby output into a vim window in a couple of ways. One way would be to open a new split window and then load output of command:
" vimscript command to open new split window
wincmd n
" run ruby command and insert output at line 1
1,1!ruby foo.rb
alternatively you could get view the output on a new tab with a single window:
tabnew
1,1!ruby foo.rb
I know it's not the answer you want, but use buffers and ditch the tabs. I have a screencast going over how to use splits to manage your window.
http://lococast.net/archives/111
As for the ruby output, that seems like it might be covered here:
https://superuser.com/questions/133886/vim-displaying-code-output-in-a-new-window-a-la-textmate
In answer to your question about opening up a tab as output, I don't think there's any built in way to do this. There's the RunView plugin (see my answers to this question and this one), but I don't think that it supports using a separate tab (it works with a split window: what I think you refer to when you say 'view').
Regarding an interactive console: no, this is not possible. See :help design-not.
As for general use of Vim, try to get used to the idea of buffers and the fact that each 'view' (my term), whether it be a split window, a tab or whatever is just a means of looking at a particular buffer. You can have multiple views on a single buffer, so you can have a source file vertical split with two headers in one tab and the same source file vertically split with another header and a different bit of the same source file in another tab. This is very powerful once you get used to it. The Ctrl-W keyboard shortcuts are your friend (e.g. Ctrl-W, h to go left one window).
As for changing a tab into a split window, I don't think there's a direct way to do this (how would Vim know which tabs you wanted to join?). You can break a split into a tab with Ctrl-W + T, but to go back you'd have to create a couple of mappings. This is off the top of my head but something like this might work:
command! TakeThis let takebufnr = bufnr("")<CR>
command! SplitTaken exe 'split #' . takebufnr<CR>
nmap ,t :TakeThis<CR>
nmap ,s :SplitTaken<CR>
Then press ,t on the buffer you want to grab and ,s on the one you want to split with the 'taken' buffer.

Resources