├── README.md └── plugin └── motivate.vim /README.md: -------------------------------------------------------------------------------- 1 | # vim-motivate 2 | 3 | Every time you start editing a file, this plugin will show 4 | you a movitational quote. 5 | 6 | If you are motivated enough, you can `:let g:i_am_motivated = 1` and 7 | vim-motivate will no longer try to motivate you. 8 | 9 | ![vim-motivate](https://i.imgur.com/PpQNqXp.png) 10 | 11 | Inspired from . 12 | -------------------------------------------------------------------------------- /plugin/motivate.vim: -------------------------------------------------------------------------------- 1 | " vim-motivate - your ultimate motivator for vim 2 | " 3 | " Every time you start editing a file, this plugin will show 4 | " you a movitational quote. 5 | " 6 | " If you are motivated enough, you can `:let g:i_am_motivated = 1` and 7 | " vim-motivate will no longer try to motivate you. 8 | 9 | 10 | if exists("loaded_vim_motivate") 11 | finish 12 | endif 13 | let loaded_vim_motivate = 1 14 | 15 | let s:quotes = [ 16 | \ 'Life is 10% what happens to you and 90% how you react to it.', 17 | \ 'Failure will never overtake me if my determination to succeed is strong ' . 18 | \ 'enough.', 19 | \ 'In order to succeed, we must first believe that we can.', 20 | \ 'What you do today can improve all your tomorrows.', 21 | \ 'Arriving at one goal is the starting point to another.', 22 | \ 'Don''t watch the clock; do what it does. Keep going.', 23 | \ 'A creative man is motivated by the desire to achieve, not by the desire '. 24 | \ 'to beat others.', 25 | \ 'It does not matter how slowly you go as long as you do not stop.', 26 | \ 'If you can dream it, you can do it.', 27 | \ 'Keep your eyes on the stars, and your feet on the ground.', 28 | \ 'You are never too old to set another goal or to dream a new dream.', 29 | \ 'Accept the challenges so that you can feel the exhilaration of victory.', 30 | \ 'Always do your best. What you plant now, you will harvest later.', 31 | \ 'The secret of getting ahead is getting started.', 32 | \ 'With the new day comes new strength and new thoughts.', 33 | \ 'Our greatest weakness lies in giving up. The most certain way to succeed ' . 34 | \ 'is always to try just one more time.', 35 | \ 'Knowing is not enough; we must apply. Willing is not enough; we must do.', 36 | \ 'Your talent is God''s gift to you. What you do with it is your gift ' . 37 | \ 'back to God.', 38 | \ 'Aim for the moon. If you miss, you may hit a star.', 39 | \ 'You have to learn the rules of the game. And then you have to play ' . 40 | \ 'better than anyone else.', 41 | \ 'Problems are not stop signs, they are guidelines.', 42 | \ 'There is only one corner of the universe you can be certain of ' . 43 | \ 'improving, and that''s your own self.', 44 | \ 'Start where you are. Use what you have. Do what you can.', 45 | \ 'Believe in yourself! Have faith in your abilities! Without a humble ' . 46 | \ 'but reasonable confidence in your own powers you cannot be ' . 47 | \ 'successful or happy.', 48 | \ 'Good, better, best. Never let it rest. ''Til your good is better ' . 49 | \ 'and your better is best.', 50 | \ 'Optimism is the faith that leads to achievement. Nothing can be done ' . 51 | \ 'without hope and confidence.', 52 | \ 'What you get by achieving your goals is not as important as what ' . 53 | \ 'you become by achieving your goals.', 54 | \ 'Do the difficult things while they are easy and do the great things ' . 55 | \ 'while they are small. A journey of a thousand miles must begin with ' . 56 | \ 'a single step.', 57 | \ 'Things do not happen. Things are made to happen.', 58 | \ 'We may encounter many defeats but we must not be defeated.', 59 | \ 'I''d rather attempt to do something great and fail than to attempt ' . 60 | \ 'to do nothing and succeed.', 61 | \ 'Never complain and never explain.', 62 | \ 'They can conquer who believe they can.', 63 | \ 'Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.', 64 | \ 'By failing to prepare, you are preparing to fail.', 65 | \ 'Do you want to know who you are? Don''t ask. Act! Action will ' . 66 | \ 'delineate and define you.', 67 | \ 'Setting goals is the first step in turning the invisible into the visible.', 68 | \ 'Perseverance is failing 19 times and succeeding the 20th.', 69 | \ 'There is no passion to be found playing small - in settling for a life ' . 70 | \ 'that is less than the one you are capable of living.', 71 | \ 'Do something wonderful, people may imitate it.', 72 | \ 'Be kind whenever possible. It is always possible.', 73 | \ 'Never give up, for that is just the place and time that the tide will ' . 74 | \ 'turn.', 75 | \ 'Without hard work, nothing grows but weeds.', 76 | \ 'Expect problems and eat them for breakfast.', 77 | \ 'The key is to keep company only with people who uplift you, whose ' . 78 | \ 'presence calls forth your best.', 79 | \ 'If you''re going through hell, keep going.', 80 | \ 'Quality is not an act, it is a habit.', 81 | \ 'You simply have to put one foot in front of the other and keep going. ' . 82 | \ 'Put blinders on and plow right ahead.', 83 | \ 'If you don''t design your own life plan, chances are you''ll fall into ' . 84 | \ 'someone else''s plan.', 85 | \ 'No bird soars too high if he soars with his own wings.', 86 | \ 'Even if you fall on your face, you''re still moving forward.', 87 | \ 'True happiness involves the full use of one''s power and talents.', 88 | \ 'Don''t fight the problem, decide it.', 89 | \ 'Either you run the day or the day runs you.', 90 | \ 'Be miserable. Or motivate yourself. Whatever has to be done, it''s ' . 91 | \ 'always your choice.', 92 | \ 'Change your life today. Don''t gamble on the future, act now, without ' . 93 | \ 'delay.', 94 | \ 'I don''t believe you have to be better than everybody else. I believe ' . 95 | \ 'you have to be better than you ever thought you could be.', 96 | \ 'There''s a way to do it better - find it.', 97 | \ 'If you want to succeed you should strike out on new paths, rather ' . 98 | \ 'than travel the worn paths of accepted success.', 99 | \ 'Poverty was the greatest motivating factor in my life.', 100 | \ 'Either I will find a way, or I will make one.', 101 | \ 'Do the one thing you think you cannot do. Fail at it. Try again. ' . 102 | \ 'Do better the second time.', 103 | \ 'The only people who never tumble are ' . 104 | \ 'those who never mount the high wire. This is your moment. Own it.', 105 | \ 'I attribute my success to this - I never gave or took any excuse.', 106 | \ 'A goal is a dream with a deadline.', 107 | \ 'If you don''t like how things are, change it! You''re not a tree.', 108 | \ 'Learning is the beginning of wealth. Learning is the beginning of ' . 109 | \ 'health. Learning is the beginning of spirituality.', 110 | \ 'Searching and ' . 111 | \ 'learning is where the miracle process all begins.', 112 | \ 'Do not wait; the time will never be ''just right.'' Start where you ' . 113 | \ 'stand, and work with whatever tools you may have at your command, ' . 114 | \ 'and better tools will be found as you go along.', 115 | \ 'Perseverance is not a long race; it is many short races one after ' . 116 | \ 'the other.', 117 | \ 'Well done is better than well said.', 118 | \ 'Go for it now. The future is promised to no one.', 119 | \ 'One finds limits by pushing them.', 120 | \ 'Don''t give up. Don''t lose hope. Don''t sell out.', 121 | \ 'Motivation is the art of getting people to do what you want ' . 122 | \ 'them to do because they want to do it.', 123 | \ 'There is always room at the top.', 124 | \ 'Pursue one great decisive aim with force and determination.', 125 | \ 'Do not wait to strike till the iron is hot; but make it hot ' . 126 | \ 'by striking.', 127 | \ 'If you fell down yesterday, stand up today.', 128 | \ 'I know where I''m going and I know the truth, and I don''t have ' . 129 | \ 'to be what you want me to be. I''m free to be what I want.', 130 | \ 'The harder the conflict, the more glorious the triumph.', 131 | \ 'When you reach the end of your rope, tie a knot in it and hang on.', 132 | \ 'Act as if what you do makes a difference. It does.', 133 | \ 'Be gentle to all and stern with yourself.', 134 | \ 'Learn from the past, set vivid, detailed goals for the future, ' . 135 | \ 'and live in the only moment of time over which you have any ' . 136 | \ 'control: now.', 137 | \ 'Never, never, never give up.', 138 | \ 'You can''t build a reputation on what you are going to do.', 139 | \ 'Motivation will almost always beat mere talent.', 140 | \ 'If you think you can do it, you can.', 141 | \ 'When you fail you learn from the mistakes you made and it motivates ' . 142 | \ 'you to work even harder.', 143 | \ 'The more we do, the more we can do.', 144 | \ 'The most effective way to do it, is to do it.', 145 | \ 'You must take action now that will move you towards your goals. ' . 146 | \ 'Develop a sense of urgency in your life.', 147 | \ 'Do whatever you do intensely.', 148 | \ 'Step by step and the thing is done.', 149 | \ 'Follow your dreams, work hard, practice and persevere.', 150 | \ 'Make sure you eat a variety of foods, get plenty of exercise ' . 151 | \ 'and maintain a healthy lifestyle.', 152 | \ 'Every exit is an entry somewhere else.', 153 | \ 'You need to overcome the tug of people against you as ' . 154 | \ 'you reach for high goals.', 155 | \ 'The more things you do, the more you can do.', 156 | \ 'Set yourself earnestly to see what you are made to do, ' . 157 | \ 'and then set yourself earnestly to do it.', 158 | \ 'We aim above the mark to hit the mark.', 159 | \ 'Set your goals high, and don''t stop till you get there.', 160 | \ 'If you want to conquer fear, don''t sit home and think about it. ' . 161 | \ 'Go out and get busy.', 162 | \ 'Small deeds done are better than great deeds planned.', 163 | \ 'Determine never to be idle. No person will have occasion to ' . 164 | \ 'complain of the want of time who never loses any. It is ' . 165 | \ 'wonderful how much may be done if we are always doing.', 166 | \ 'I''ve found that luck is quite predictable. If you want more luck, ' . 167 | \ 'take more chances. Be more active. Show up more often.', 168 | \ 'Decide what you want, decide what you are willing to exchange for it. ' . 169 | \ 'Establish your priorities and go to work.', 170 | \ 'Do your work with your whole heart, and you will succeed - there''s ' . 171 | \ 'so little competition.', 172 | \ 'I really believe that everyone has a talent, ability, or skill that ' . 173 | \ 'he can mine to support himself and to succeed in life.', 174 | \ 'Always continue the climb. It is possible for you to do whatever you ' . 175 | \ 'choose, if you first get to know who you are and are willing to work ' . 176 | \ 'with a power that is greater than ourselves to do it.', 177 | \ 'To be a good loser is to learn how to win.', 178 | \ 'A will finds a way.', 179 | \ 'If you don''t ask, you don''t get.', 180 | \ 'When something is important enough, you do it even if the odds ' . 181 | \ 'are not in your favor.', 182 | \ 'After a storm comes a calm.', 183 | \ 'Go big or go home. Because it''s true. What do you have to lose?', 184 | \ 'To know oneself, one should assert oneself.', 185 | \ 'If you''ve got a talent, protect it.', 186 | \ 'Leap, and the net will appear.', 187 | \ 'The more man meditates upon good thoughts, the better will be ' . 188 | \ 'his world and the world at large.', 189 | \ 'Don''t brood. Get on with living and loving. You don''t have forever.', 190 | \ 'The people who influence you are the people who believe in you.', 191 | \ 'I am not afraid... I was born to do this.', 192 | \ 'There is progress whether ye are going forward or backward! The ' . 193 | \ 'thing is to move!', 194 | \ 'Never retreat. Never explain. Get it done and let them howl.', 195 | \ 'If you ask me what I came into this life to do, I will tell you: ' . 196 | \ 'I came to live out loud.', 197 | \ 'The first step toward success is taken when you refuse to be ' . 198 | \ 'a captive of the environment in which you first find yourself.', 199 | \ 'A somebody was once a nobody who wanted to and did.', 200 | \ 'Only I can change my life. No one can do it for me.', 201 | \ 'The ultimate aim of the ego is not to see something, but to be something.', 202 | \ 'How do you know you''re going to do something, untill you do it?', 203 | \ 'What is called genius is the abundance of life and health.', 204 | \ 'To be wholly devoted to some intellectual exercise is to have ' . 205 | \ 'succeeded in life.', 206 | \ 'The dog that trots about finds a bone.', 207 | \ 'When one must, one can.', 208 | \ 'We make the world we live in and shape our own environment.', 209 | \ 'Always desire to learn something useful.', 210 | \ 'The hardships that I encountered in the past will help me ' . 211 | \ 'succeed in the future.', 212 | \ 'From my tribe I take nothing, I am the maker of my own fortune.', 213 | \ 'Begin to be now what you will be hereafter.', 214 | \ 'You can''t wait for inspiration. You have to go after it with a club.', 215 | \ 'The past cannot be changed. The future is yet in your power.', 216 | \ 'Hitch your wagon to a star.', 217 | \ 'Your heaviest artillery will be your will to live. ' . 218 | \ 'Keep that big gun going.', 219 | \ 'We are taught you must blame your father, your sisters, ' . 220 | \ 'It''s never your fault. ' . 221 | \ 'But it''s always your fault, because if you wanted to ' . 222 | \ 'change you''re the one who has got to change.', 223 | \ 'No matter how many goals you have achieved, you must set ' . 224 | \ 'your sights on a higher one.', 225 | \ 'I''ve always tried to go a step past wherever people ' . 226 | \ 'expected me to end up.', 227 | \ 'The weeds keep multiplying in our garden, which is our ' . 228 | \ 'mind ruled by fear. Rip them out and call them by name.', 229 | \ 'You create your opportunities by asking for them.', 230 | \ 'Who seeks shall find.', 231 | \ 'It''s always too early to quit.', 232 | \ 'You can never quit. Winners never quit, and quitters never win.', 233 | \ 'You can''t expect to hit the jackpot if you don''t put ' . 234 | \ 'a few nickels in the machine.', 235 | \ 'It is very important to know who you are. To make decisions. ' . 236 | \ 'To show who you are.', 237 | \ 'March on. Do not tarry. To go forward is to move toward ' . 238 | \ 'perfection.', 239 | \ 'March on, and fear not the thorns, or the ' . 240 | \ 'sharp stones on life''s path.', 241 | \ 'Crave for a thing, you will get it. Renounce the craving, ' . 242 | \ 'the object will follow you by itself.', 243 | \ 'One way to keep momentum going is to have constantly greater ' . 244 | \ 'goals.', 245 | \ 'Know or listen to those who know.', 246 | \ 'Opportunity does not knock, it presents itself when you beat ' . 247 | \ 'down the door.', 248 | \ 'Big shots are only little shots who keep shooting.', 249 | \ 'Get action. Seize the moment. Man was never intended to become ' . 250 | \ 'an oyster.', 251 | \ 'Where there is a will, there is a way.', 252 | \ 'If there is a chance in ' . 253 | \ 'a million that you can do something, anything, to keep what ' . 254 | \ 'you want from ending, do it. Pry the door open or, if need be, ' . 255 | \ 'wedge your foot in that door and keep it open.', 256 | \ 'Press forward. Do not stop, do not linger in your journey, but ' . 257 | \ 'strive for the mark set before you.', 258 | \ 'To begin, begin.', 259 | \ 'I was motivated to be different in part because I was different.', 260 | \ 'Wherever you are - be all there.', 261 | \ 'God always strives together with those who strive.', 262 | \ 'Deserve your dream.', 263 | \ 'Be thine own palace, or the world''s thy jail.', 264 | \ 'Either move or be moved.', 265 | \ 'You have to make it happen.', 266 | \ 'The will to succeed is important, but what''s more important is ' . 267 | \ 'the will to prepare.', 268 | \ 'Never give in and never give up.', 269 | \ 'I am not a has-been. I am a will be.', 270 | \ 'You just can''t beat the person who never gives up.', 271 | \ 'Whatever you want in life, other people are going to want it too. ' . 272 | \ 'Believe in yourself enough to accept the idea that you have ' . 273 | \ 'an equal right to it.', 274 | \ 'There is nothing deep down inside us except what we have put ' . 275 | \ 'there ourselves.', 276 | \ 'Follow your inner moonlight; don''t hide the madness.', 277 | \ 'Set your sights high, the higher the better.', 278 | \ 'Expect the most ' . 279 | \ 'wonderful things to happen, not in the future but right now. ', 280 | \ 'Realize that nothing is too good. Allow absolutely nothing to ' . 281 | \ 'hamper you or hold you up in any way.', 282 | \ 'He conquers who endures.', 283 | \ 'I know not age, nor weariness nor defeat.', 284 | \ 'Only the educated are free.', 285 | \ 'I come to win.', 286 | \ 'The wise does at once what the fool does at last.', 287 | \ 'I can, therefore I am.', 288 | \ 'Do not weep; do not wax indignant. Understand.', 289 | \ 'Many are called but few get up.', 290 | \ 'You never know what motivates you.', 291 | \ 'One may miss the mark by aiming too high as too low.', 292 | \ 'Earl Nightingale has inspired more people toward success and ' . 293 | \ 'fortune than any other motivational speaker on the planet.', 294 | \ 'Success is the only motivational factor that a boy with character ' . 295 | \ 'needs.', 296 | \ 'I''m a motivational speaker.' 297 | \ ] 298 | 299 | 300 | " Vim doesn't have a native random number generator 301 | " Random number generator is taken from: 302 | " https://stackoverflow.com/questions/12737977/native-vim-random-number-script 303 | function! s:randQuote() 304 | let rand = str2nr(matchstr(reltimestr(reltime()), '\v\.@<=\d+')[1:]) 305 | return s:quotes[rand % len(s:quotes)] 306 | endfunction 307 | 308 | 309 | function! s:showRandomQuote() 310 | " FIXME: width is current buffer width, not screen width 311 | let width = winwidth(0) 312 | 313 | if width < 60 || exists('g:i_am_motivated') 314 | return 315 | endif 316 | 317 | let quote = s:randQuote() 318 | while len(quote) > width 319 | let quote = s:randQuote() 320 | endwhile 321 | 322 | redraw 323 | echo quote 324 | endfunction 325 | 326 | 327 | augroup motivate 328 | autocmd! BufNewFile * call s:showRandomQuote() 329 | autocmd! BufRead * call s:showRandomQuote() 330 | augroup END 331 | --------------------------------------------------------------------------------