How to apply themes into .zshrc file - themes

How to apply themes in a .zshrc file?
$ git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
$ ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
and then, I changed the text like
ZSH_THEME="spaceship"
then, I made .spaceship_config file and saved it (my home directory).
As manual, I put
source ~/.spaceship_config
this code into .zshrc file but it didn't work like
source:12: no such file or directory: path blahblah

Related

How to create .zshrc in Mac home directory?

I have started using Mac for the first time and I am trying to set up flutter. One of the steps is to add path in file .zshrc. For this I have to first create this file. In Windows, whenever I had to create file, I used Git Bash and use touch <filename> in any directory and the file was created. Some websites mention that touch works in Mac terminal also.
How to create this file in home directory? I tried going to the home directory using cd ~ and then touch .zshrc and touch ~/.zshrc but they don't seem to work. I also tried to save file with this extension using TextEdit but doesn't work either. I have checked Show all filename extensions in Finder > Preferences > Advanced.
So what is the way to create this file in home directory either using Finder or terminal?

How to open sublime text from terminal in windows?

I have installed my sublime text editor in d drive some days ago and i have customized it. and then i have create .bashrc file in users/my-name directory. then i added:
alias subl = 'the directory i have copied from the app-properties'
but it doesn't work..
when i type
subl .
it shows me,
$ subl .
bash: $: command not found
How can I open sublime text editor in git bash.
enter image description here
Let's say you installed sublime in folder d:\Sublime Text 3.
In this way you need set correct path for alias in .bashrc located in directory users/my-name. Please, take note that folder's name can have backspaces.
alias subl="/d/Sublime\ Text\ 3/sublime_text.exe"
To apply changes run commands in git bash:
cd ~
source .bashrc
Then you can run sublime with command:
subl .

Terminal cannot find bashrc file when using source command

I recently downloaded mysql. What am I doing wrong when I source the bash file?
The path for my bashrc file is:
Users/Name/bashrc
(I moved it from a different location, can't remember from where, but I figure that if the path is right, it shouldn't matter)
In the terminal, I'm supposed to use:
source ~/.bashrc
When I type that and press enter, it returns:
-bash: /Users/Name/.bashrc: No such file or directory
The bash file itself says:
source /etc/bash.bashrc
source ~/.bashrc
export PATH=$PATH:/usr/local/mysql/bin
You need to have the file .bashrc located in ~ to be able to source it. ~ expands to $HOME (/Users/Name in your case).
If the output of cd ~ && ls -la doesn't contain .bashrc, then you don't have that file, so you cannot source it.
Based on your comments, your file is ~/bashrc.sh (not a great name). If you delete the first two lines of this file, it will work properly. Note that you'll have to source this file every time you open a new terminal. You can add the line
export PATH=$PATH:/usr/local/mysql/bin
to a file that gets automatically sourced upon login, like ~/.bash_profile, /etc/bash.bashrc (not recommended), or create a ~/.bashrc and include that line.

Unable to install modman, .profile is missing

https://github.com/colinmollenhour/modman/blob/master/README.md
I am trying to install modman.
First I install via:
bash < <(curl -s -L https://raw.github.com/colinmollenhour/modman/master/modman-installer)
modman is created at User/Username/bin/modman
I got lost on the next part:
source ~/.profile
I don't have .profile in my directory, so i created one in my user root and I added
export PATH=$PATH:/Users/Username/bin/modman
I am not sure if that is correct, when I cd to my project directory and
do modman init it returns modman: command not found
Why am I getting this message?
You add directories to PATH, not individual binaries.
export PATH=$PATH:/Users/Username/bin
Note the line from the installer that would have updated .profile for you:
echo -e '\nPATH="$HOME/bin:$PATH"' >> $HOME/.profile
(Typically, you might add $HOME/bin to the beginning of the path so that you can override system binaries, but in your case, it doesn't matter since you don't have modman installed outside your home directory.)

where is ~\.vim folder in mac os? and how to install themes in gvim?

I downloaded color sample pack from http://vim.sourceforge.net/scripts/script.php?script_id=625
it says i should unzip and place it into ~/.vim but where is this folder? I tried unzip it to my usr/share/.vim folder but it is not working, I don't see themes added to gvim Edit>color scheme menu, and i tried "colorscheme sometheme", "color sometheme" in my gvimrc. Both not working for new themes
Isn't the ~/.vim should be the .vim folder in use/share? or I should create a new folder under home?
Note:there is a folder vim73 in my .vim, I guess this doesn't affect anything
thanks for any help!
First of all, open vim, and get help from :help colorscheme
:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
for the file "colors/{name}.vim. The first one that
is found is loaded.
After reading the manual above.
Take the following steps maybe help you:
find runtimepath
:set runtimepath?
It will print out run-time paths:
runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim71,/usr/share/vim/vimfiles/after,~/.vim/after
create directory called colors under one of them if not exist(for example: ~/.vim)
$ ls ~/.vim
ls: cannot access /root/.vim: No such file or directory <== we need create it!!!
$ mkdir -p ~/.vim/colors
copy your color.vim to your colors directory
$ cp /path/to/your/color.vim ~/.vim/colors
restart vim to use new colorscheme
:colorscheme color
(optional) put command above to ~/.vimrc file to make it permanent
In UNIX parlance, ~ represents your home folder which is /Users/<username> in Mac OS X.
You are supposed to put all your custom scripts/colorschemes/whatever in a .vim folder situated in your home folder. In Terminal.app, type each line (without the $) then hit Enter:
$ cd
to be sure you are in your home folder
$ mkdir .vim
here you'll have an error message if ~/.vim already exists; if you don't receive a message it means that the folder is created
$ cd .vim
to move into it
$ open .
to open a Finder window here. At this point you should follow specific indications.

Resources